Skip to main content

Calculation Revenue

Revenue calculation in tableau

1. CYMTD
[YEAR]<=TODAY() AND DATETRUNC('month',[YEAR])=
DATETRUNC('month',TODAY())

2. CYQTD
[YEAR]<=TODAY() AND DATETRUNC('quarter',[YEAR])=DATETRUNC('quarter',TODAY())

3. PYMTD
([YEAR]<=DATEADD("year",-1,TODAY())  AND [YEAR]>=
DATEADD("year",-1,DATETRUNC("month",TODAY())))

4. PYQTD
[YEAR]<=DATEADD("year",-1,TODAY()) AND [YEAR]>=DATEADD("year",-1,DATETRUNC("quarter",TODAY()))

5. PYTD
[YEAR]<=DATEADD('year',-1,TODAY()) 
AND DATEDIFF('year',[YEAR],TODAY())=1

6. YTD
[YEAR]<=TODAY() AND DATETRUNC('year',[YEAR])=DATETRUNC('year',TODAY())

7. MOM
SUM([Revenue CY MTD]-([Revenue PY MTD]))/SUM([Revenue PY MTD])

8. QOQ
SUM([Revenue CY QTD]-([Revenue PY QTD]))/SUM([Revenue PY QTD])

9. REVENUE CY
CASE [Period]
WHEN 'YoY' then [Revenue CYTD]
WHEN 'QoQ' THEN [Revenue CY QTD]
WHEN 'MoM' THEN [Revenue CY MTD]
END

10. Revenue CY MTD
ZN(IF[CYMTD] THEN [REVENUE] END)

11. Revenue CY QTD
ZN(IF[CYQTD] THEN [REVENUE] END)

12. Revenue CYTD
ZN(IF [YTD] THEN [REVENUE] END)

13. Revenue PY
CASE [Period]
WHEN 'YoY' then [Revenue PYTD]
WHEN 'QoQ' THEN [Revenue PY QTD]
WHEN 'MoM' THEN [Revenue PY MTD]
END

14. Revenue PY MTD
ZN(IF [PYMTD] THEN [REVENUE] END)

15. Revenue PY QTD
ZN(IF[PYQTD] THEN [REVENUE] END)

16. Revenue PYTD
Zn(IF [PYTD] THEN [REVENUE] END)

17. Year Filter
YEAR(TODAY())-1

18. Period  (This is parameter)
YoY -- Year Over Year
MOM --- Month Over Month
QOQ --- Quarter Over Quarter

19. DIFFERENCE%
CASE [Period]
WHEN 'YoY' then [YOY]
WHEN 'QoQ' THEN [QOQ]
WHEN 'MoM' THEN [MOM]
END

20. YOY
ZN(sum([Revenue CYTD]) - SUM([Revenue PYTD]))/(SUM([Revenue PYTD]))

21. Down Trend
IF [Difference%]<0 Then "▼"

22. Up Trend
IF [Difference%]>0 Then "▲"
END

23. Week Number
DATE(DATEPARSE ("yyyy-MM-dd", STR(DATE(DATETRUNC('week',[date]))) ))

Now, let's take a look at the revenue formula itself (in both forms):

For a product-based business, the formula is
Revenue = Number of Units Sold x Average Price.

For service-based companies, the formula is
Revenue = Number of Customers x Average Price of Services.

Comments

Popular posts from this blog

Difficulty and challenges

  What is bi technology? BI technology includes many tools and technologies, with the help of which we analyze the data, and on the basis of the data represent the data in the form of charts, graphs and maps etc., so that this technology can help the business user and understand the data and provide a way to grow the business as well as help business users to overcome many challenges and move forward. How can we make our career in this? Anyone can make a career in this, to make a career in BI technology, you will need these things. 1. Your way of understanding and speaking should be simple. 2. You have done college and you have good knowledge of statistics. 3. You should have knowledge of any database and you should be proficient in it. 4. You should have knowledge of web technology. 5. You should have knowledge of how do you expand the data into graphs and charts based on the data. 6. Be able to upgrade to the technology that suits the times. You can make your career in BI on the ...

Tableau Title case

 Tableau converting text case  UPPER case function lower case function Proper case function UPPER case function : The upper case function converts all letters to uppercase (capital letters) ex: Function  Name : UPPER (Name) Result: Name: AJAY KUMAR lower case function : The lower case function converts all letters to lowercase.(small letters) ex: Function Name: LOWER(Name) Result: Name: ajay kumar Proper Case The Proper case is text that is capitalized with the first letter of each word. ex: Create a calculator field for this: Name UPPER(LEFT(SPLIT([Name],' ',1),1)) + LOWER(MID(SPLIT([Name],' ',1),2,20)) + ' ' + UPPER(LEFT(SPLIT([Name],' ',2),1)) + LOWER(MID(SPLIT([Name],' ',2),2,20)) + ' ' + UPPER(LEFT(SPLIT([Name],' ',3),1)) + LOWER(MID(SPLIT([Name],' ',3),2,20)) Result: Name: Ajay Kumar

Git Hub

GitHub GitHub is a version control and code hosting platform for collaboration. Acquired by Microsoft in 2018, it allows us and others to work from anywhere on multiple projects at once. With the help of GitHub, we can access our code from anywhere and a positive example of this is that if you ever wrote any code or did any productive work and you need it in the future, then you can easily review your work. And together after writing the code once, you will be able to use your work again and again, which will save your precious time and you will also be able to do  productive work. What is Repository? A repository contains all our project files and the history of each file modification. We can discuss and manage project work created in our repository. Basic Step to Create a Repository Step 1:  Login to GitHub for more  Click me  Login or Sign Up    Successfully Login       After login successfully you will be in GitHub main page/das...