cancel
Showing results for
Did you mean:
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
Super User

Hi,

Hope this helps.

Regards,
Ashish Mathur
http://www.ashishmathur.com
7 REPLIES 7
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 !!
Frequent Visitor

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.

Super User

What result are you expecting?  Please show that clearly.

Regards,
Ashish Mathur
http://www.ashishmathur.com
Frequent Visitor

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

 Date(Month/Year) Amount MOM Percentage Difference May 2022 7468 -80% April 2022 36522 -38% March 2022 58872 190% Feb 2022 20301 -54% Jan 2022 43971 -55% Dec 2021 96699

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

Super User

Hi,

Hope this helps.

Regards,
Ashish Mathur
http://www.ashishmathur.com
Frequent Visitor

Thank you Ashish . That worked.

Super User

You are welcome.

Regards,
Ashish Mathur
http://www.ashishmathur.com

Announcements