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

Job market for tableau and power bi

Both Tableau and Power BI are highly sought-after skills in the job market due to their popularity and the increasing demand for data visualization and business intelligence professionals. Here's an overview of the job market for Tableau and Power BI: Tableau : Tableau Developer : These professionals are responsible for creating and maintaining interactive dashboards and visualizations using Tableau. They should have strong skills in data analysis, data visualization, and dashboard design. Tableau Consultant : Tableau consultants work with clients to understand their data needs, design effective solutions using Tableau, and provide guidance on best practices for data visualization and analysis. Tableau Administrator : Tableau administrators are responsible for managing the Tableau Server environment, including installation, configuration, security, and performance optimization. They ensure the smooth functioning of Tableau deployments and address any technical issues that arise. Bu...

Filter In Tableau

 Tableau Filter Tableau is a powerful data visualization tool that allows you to create interactive dashboards and reports. One of the key features of Tableau is the ability to filter data in real-time, making it easy to drill down into specific data points and get insights quickly. In this blog, we will focus on the filter feature in Tableau and how it can help you analyze your data more efficiently. What is Filter in Tableau? Filters are a way to refine the data displayed in a visualization. They allow you to control which data is displayed in the view, based on the criteria you specify. You can use filters to exclude or include data, change the date range, filter data by region or category, or any other criteria that makes sense for your data analysis. Tableau offers a range of filter types to suit your needs, including: - Dimension Filters: These filters are used to filter data based on the values in a specific dimension. For example, if you have a sales dashboard, you can use ...

Web data connector

Tableau is a powerful data visualization tool that allows you to connect to and analyze data from various sources, including web data. In this blog, we will focus on the web data connector feature in Tableau, and how it can help you connect to web-based data sources and create interactive dashboards. What is Web Data Connector in Tableau? The web data connector in Tableau is a feature that allows you to connect to data from web-based sources that are not supported by default connectors in Tableau. With the web data connector, you can create custom connections to web-based data sources, including APIs, JSON files, and other web-based data sources. Why Use Web Data Connector in Tableau? The web data connector allows you to access a wide range of web-based data sources that are not natively supported in Tableau. This includes data from social media platforms, news sites, weather APIs, and other web-based data sources. By using the web data connector, you can easily integrate web-based dat...