Number of milk cans sold by the company in the past four years:
2018 = 350
2019 = 450
2020 = 500
2021 = 650
Calculate the company's average annual growth rate.
So, if the present value is 650, the past value is 350 and the number of years is 4, you get:
Growth rate after 2018: (450 - 350) / 350 x 100 = 28.57%
Growth rate after 2019: (500 - 450) / 450 x 100 = 11.11%
Growth rate after 2020: (650 - 500) / 500 x 100 = 30%
Average growth rate over time = (28.57% + 11.11% + 30%) / 3 = 23.22% per year
Im struggling to get this in dax query .
Please Suggest a method to get Average growth rate over time
Solved! Go to Solution.
@vivek_rana , using a separate date or year table
//Only year vs Year, not a level below
This Year = CALCULATE(sum('Table'[Qty]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])))
Last Year = CALCULATE(sum('Table'[Qty]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])-1))
diff = [This Year]-[Last Year ]
diff % = divide([This Year]-[Last Year ],[Last Year ])
Now create Avg diff %
Avg diff % = AverageX(values('Date'[Year]), [diff %])
How can we do it at Year -month level. I tried replacing Year with Yearmonth field from calender table..but seems like its not working... Can you please suggest here.
What result are you expecting? Please show that clearly.
@Ashish_Mathur .- I have this Output right now, with month over month percentage difference calculated.
|Date(Month/Year)||Amount||MOM Percentage Difference|
I am trying to show Average of MOM Percentage Difference in a CARD.
so I think output should be (-80+(-38)+190+(-54)+(-55))/5 = -7.40.
Please correct me if i am wrong.
Sharing Calculation for MOM Percentage Difference :
Hi, I have a request to calculate the average growth rate for the last 5 years, the last 7 years, and so on. I have calculated the average growth for all years but am struggling to do this new request in the Dax query.
Share some data, explain the question and show the expected result.
Thank you for your quick response. I have a data set that has data from 1995 to 2022, and I have calculated the average growth rate from 1995 to 2022. I now need to calculate the average growth rate for the last 5 years, the last 7 years, etc. See the below example.
Average Growth Rate from 2010 to 2022
Average Growth Rate from 2018 to 2022 (Last 5 Years)
Average Growth Rate from 2016 to 2022 (Last 7 Years)
I have calculated the average growth from 2010 to 2022, which is 3.08%, but I'm having trouble figuring out the 5.0% growth rate during the previous five years. I created a DAX formula, but it did calculate the average of 5 years for all years, but still, it was wrong. Any help would be appreciated.
Check out the November 2023 Power BI update to learn about new features.
130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.