Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
Hi ,
I have created CAGR folmula as per the "https://powerbi.tips/2016/05/measures-calculate-cagr/".
NoofYrs = 2
FILTER(ComData,ComData[Year]=(MAX(ComData[Year])-2)
FILTER(ComData,ComData[Year]=MAX(ComData[Year])
I want to calculate CAGR as per the filter selection (Year), So what i have to use instead of Max for dynamic selection CAGR.
Formula :
DynamicCAGR = (CALCULATE(SUM(ComData[Amount]),FILTER(ComData,ComData[Year]=(MAX(ComData[Year])-2)))/ CALCULATE(SUM(ComData[Amount]),FILTER(ComData,ComData[Year]=MAX(ComData[Year]))))^(1/[NoofYrs])-1
Thanks,
Hi @Himanshu
One solution to this problem is to make use of Parameter Table.
Go to Modelling Tab and create a new Table "YearsTable". This will be used for selecting Years.
YearsTable = summarize(ComData,ComData[YEAR])
Create YEAR slicer using above table and select any year other than most recent year
Now create following measures in your "ComData" Table
MostRecentYear = CALCULATE(max(ComData[YEAR]),all(ComData[YEAR])) MostRecentYearValue = calculate(Sum([Amount]),filter(All(ComData[YEAR]),ComData[YEAR]=[MostRecentYear])) SelectedYearValue = calculate(Sum(ComData[Amount]),filter(All(ComData[YEAR]),ComData[YEAR]=values(YearsTable[YEAR]))) Multiplier = [MostRecentYear]-values(YearsTable[YEAR])
Now your Dynamic CAGR measure would be
Dynamic_CAGR = ([MostRecentYearValue]/[SelectedYearValue])^(1/[Multiplier])-1
If you need the file let me know. I tried this and it works smoothly
@@Zubair_Muhamma
Hi Zubair - I know this is 2 years old, but hoping you can help fairly quickly!
Thanks in advance for your assistance!
@Zubair_Muhammad wrote:Hi @Himanshu
One solution to this problem is to make use of Parameter Table.
Go to Modelling Tab and create a new Table "YearsTable". This will be used for selecting Years.YearsTable = summarize(ComData,ComData[YEAR])Create YEAR slicer using above table and select any year other than most recent year
Now create following measures in your "ComData" TableMostRecentYear = CALCULATE(max(ComData[YEAR]),all(ComData[YEAR])) MostRecentYearValue = calculate(Sum([Amount]),filter(All(ComData[YEAR]),ComData[YEAR]=[MostRecentYear])) SelectedYearValue = calculate(Sum(ComData[Amount]),filter(All(ComData[YEAR]),ComData[YEAR]=values(YearsTable[YEAR]))) Multiplier = [MostRecentYear]-values(YearsTable[YEAR])
Now your Dynamic CAGR measure would beDynamic_CAGR = ([MostRecentYearValue]/[SelectedYearValue])^(1/[Multiplier])-1
If you need the file let me know. I tried this and it works smoothly
I am experiencing circular references when following your directions. Any ideas?
@Himanshu,
Do you get issues when creating dynamic CAGR? If so, please share more details about your scenario and post expected result here.
If you just share the DAX you use to calculate CAGR as per the filter selection, thanks for your sharing the formula.
Regards,
Lydia
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 22 | |
| 22 | |
| 21 | |
| 19 | |
| 12 |
| User | Count |
|---|---|
| 58 | |
| 53 | |
| 41 | |
| 34 | |
| 32 |