Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I am putting together a dashboard, need quick help on something.
I have sales data for various cars from 2008 to 2017. Now i want to calculate the growth of sales from year on year.
I have calculated 10 measures for each of the years from 2008 till 2017.
What is the best way to do this?
Solved! Go to Solution.
Hi @iceteapilot ,
If you want to calculate YOY growth rate based on segment, please refer to the following measure:
YoYGrowth =
VAR l =
CALCULATE (
SUM ( 'TABLE'[SALES] ),
FILTER (
ALL ( 'Table' ),
'Table'[SEGMENT] IN DISTINCT ( 'Table'[segment] )
&& 'Table'[YEAR]
= MAX ( 'Table'[YEAR] ) - 1
)
)
VAR C =
CALCULATE (
SUM ( 'TABLE'[SALES] ),
FILTER (
ALL ( 'Table' ),
'Table'[SEGMENT] IN DISTINCT ( 'Table'[segment] )
&& 'Table'[YEAR] = MAX ( 'Table'[YEAR] )
)
)
RETURN
DIVIDE ( C, l ) - 1
Best Regards,
Dedmon Dai
Hi @iceteapilot ,
If you want to calculate YOY growth rate based on segment, please refer to the following measure:
YoYGrowth =
VAR l =
CALCULATE (
SUM ( 'TABLE'[SALES] ),
FILTER (
ALL ( 'Table' ),
'Table'[SEGMENT] IN DISTINCT ( 'Table'[segment] )
&& 'Table'[YEAR]
= MAX ( 'Table'[YEAR] ) - 1
)
)
VAR C =
CALCULATE (
SUM ( 'TABLE'[SALES] ),
FILTER (
ALL ( 'Table' ),
'Table'[SEGMENT] IN DISTINCT ( 'Table'[segment] )
&& 'Table'[YEAR] = MAX ( 'Table'[YEAR] )
)
)
RETURN
DIVIDE ( C, l ) - 1
Best Regards,
Dedmon Dai
Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Take Year as a new Dimension and join with this table and the try
last year sales
calculate(sum(sales), filter(all(Year),Year[Year]=max(Year[Year])-1))
This year =
calculate(sum(sales), filter(all(Year),Year[Year]=max(Year[Year])))
Diff = [This year] -[last year sales]
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
98 | |
81 | |
65 | |
62 |
User | Count |
---|---|
147 | |
116 | |
104 | |
88 | |
65 |