Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

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

12 REPLIES 12
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 %])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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/

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.

Hi,

Share some data, explain the question and show the expected result.


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

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.

 

FY

Description

 Value

Growth Rate

2010

Sales

 $                                       85,063.54

 

2011

Sales

 $                                       86,500.00

1.7%

2012

Sales

 $                                       83,200.00

-3.8%

2013

Sales

 $                                       88,250.00

6.1%

2014

Sales

 $                                       89,425.00

1.3%

2015

Sales

 $                                       90,120.00

0.8%

2016

Sales

 $                                       91,250.00

1.3%

2017

Sales

 $                                       95,500.00

4.7%

2018

Sales

 $                                       96,100.00

0.6%

2019

Sales

 $                                       97,280.00

1.2%

2020

Sales

 $                                       95,250.00

-2.1%

2021

Sales

 $                                    100,150.00

5.1%

2022

Sales

 $                                    120,250.00

20.1%

Average Growth Rate from 2010 to 2022

3.08%

Average Growth Rate from 2018 to 2022 (Last 5 Years)

5.0%

Average Growth Rate from 2016 to 2022 (Last 7 Years)

4.4%

 

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.

 

Thank you Ashish . That worked.

You are welcome.


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

Hello I am having the same problem as well. Can you upload the file again so that I can check the dax? Thank you

Hi,

File attachd.


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

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.