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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Cumulative Growth index in DAX

Hello!

 

First time poster, long time follower. 

 

I am having a mind blank and for the life of me I cannot figure out the DAX formula to create this end result as shown in grey on the below screenshot.

 

PowerBI Index Example.PNG

 

These are mock numbers I have prepared in excel to show my desired result. In Power BI I already have two matrix tables showing the sales, as well as the Annual Growth % which I created using DAX.

 

But what I am really after is to show the cumulative growth trend as per the final table and chart, where the base value will always be 1 (selected from a year slicer) so that all regions begin from the same point and show the annual trend.

 

Any help would be much appreciated. Thank you!

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, please check the below.

All measures are in the sample pbix file's link down below.

 

 

Picture1.png

 

Annual growth (cumulative index) : =
VAR currentperiodindex =
MAX ( Period[Index] )
VAR regiontable =
ADDCOLUMNS (
CROSSJOIN ( VALUES ( Region[Region] ), ALL ( Period[Index], Period[Period] ) ),
"@growth",
CALCULATE (
VAR currentsales = [Sales :]
VAR currentperiod =
MAX ( Period[Index] )
VAR previoussales =
CALCULATE (
[Sales :],
FILTER ( ALL ( Period ), Period[Index] = currentperiod - 1 )
)
VAR growth =
DIVIDE ( currentsales - previoussales, previoussales )
RETURN
IF ( SELECTEDVALUE ( Period[Index] ) = 1, 1, growth )
)
)
RETURN
SUMX ( FILTER ( regiontable, Period[Index] <= currentperiodindex ), [@growth] )

 

 

Link to the sample pbix file 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Wow, what a work of art. Worked a treat. Thank you!

Jihwan_Kim
Super User
Super User

Hi, please check the below.

All measures are in the sample pbix file's link down below.

 

 

Picture1.png

 

Annual growth (cumulative index) : =
VAR currentperiodindex =
MAX ( Period[Index] )
VAR regiontable =
ADDCOLUMNS (
CROSSJOIN ( VALUES ( Region[Region] ), ALL ( Period[Index], Period[Period] ) ),
"@growth",
CALCULATE (
VAR currentsales = [Sales :]
VAR currentperiod =
MAX ( Period[Index] )
VAR previoussales =
CALCULATE (
[Sales :],
FILTER ( ALL ( Period ), Period[Index] = currentperiod - 1 )
)
VAR growth =
DIVIDE ( currentsales - previoussales, previoussales )
RETURN
IF ( SELECTEDVALUE ( Period[Index] ) = 1, 1, growth )
)
)
RETURN
SUMX ( FILTER ( regiontable, Period[Index] <= currentperiodindex ), [@growth] )

 

 

Link to the sample pbix file 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.