cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vivek_rana
Frequent Visitor

Average Growth Rate

How to calculate Average growth rate over time Dax query
 

Let say
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

1 ACCEPTED SOLUTION

Hi,

The answer should be -7.18%.  You may download the PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

7 REPLIES 7
amitchandak
Super User
Super User

@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 %])



Power BI Features || Datamarts: https://youtu.be/8tskWsJTEpg || Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Time Intelligence Decoded : https://youtu.be/aU2aKbnHuWs&t=145s
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!
Want To Learn Power BI | Beginners !! Advance Concepts !! Power BI For Tableau User !!

Hi @amitchandak 

 

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.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Ashish_Mathur   .- I have this Output right now, with month over month percentage difference calculated.

Date(Month/Year)AmountMOM Percentage Difference 
May 20227468-80% 
April 202236522-38% 
March 202258872190% 
Feb 202220301-54% 
Jan 202243971-55% 
Dec 202196699  

 

 

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 :

MoM% =
VAR Sum_CY = SUM ( Orders[Sales] )
VAR Sum_PY =
CALCULATE (
SUM ( Orders[Sales] ),
ALLEXCEPT (Orders,Orders[Category]),
DATEADD ( 'Calendar'[Date].[Date], -1, MONTH )
)
VAR MoM =
DIVIDE ( Sum_CY, Sum_PY ) - 1
Var Result =
IF (
MoM = -1,
BLANK (),
MoM
)
Return Result

 

 

 

 

 

Hi,

The answer should be -7.18%.  You may download the PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you Ashish . That worked.

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors