Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi everyone!
I`m using the two formulas below to calculate the compound annual growth rate (CAGR) of some KPIs. The first formula calculates the CAGR for a company selected. The second formula calculates the CAGR for the company`s industry.
Sometimes the CAGR cannot be calculate for mathematical reasons (e.g. when the denominator is zero), which is completely fine. In these cases, I get this "See details" error message. Also, when there are no values available for a selected year in my range, I get an "(Blank)".
Now, I`m wondering how I can adjust the two formulas to show an "n/a" in these two cases.
Thank you very much for any assistance!
KPI 1
KPI 2
 
					
				
		
Hi, @MSC
Can you provide some of the sample data and what you expect the output to be? Please remove any sensitive data in advance. How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
There is something I don`t understand with the error message outlined above. I get the error message when I calculate the CAGR in one formula (i.e. with VAR CAGR_3, see below). However, when I "split" the calculation in separate variables with exactly the same mathematical operations, it works (i.e. with VAR CAGR_3_manually, see below).
Why is that and how can I solve this? Is it caused by my nested IF statement specifying the conditions under which the different CAGR calculations should be applied?
Here is an example of an updated DAX formula (in bold), pay only attention to the calculation of CAGR_3.
@MSC Sometimes returning "N/A" within your formula causes issues, as it will create a measure that returns multiple data types, and can make it challenging if you want to use this measure in a graph. If you only want it in a table or card visual, then all good.
You've already used the 'DIVIDE' function, this has an optional third argument you could add 'N/A' to or I sometimes use 0, -999 or something similar (depending on the requirements and uses) when working with numerics.
You also already have an IF statement, so again just use the optional 3rd argument to add the 'N/A' result.
Here's an example:
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved. 
If you found this post helpful, please give Kudos  C 
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query. 
www.excelwithallison.com
@AllisonKennedy  Thanks a lot for your comment! I`ve tried to add a 3rd argument which worked out in some cases. However, currently I get the error message "Error fetching data for this visual" - "MdxScript(Model) (1215, 14) Calculation error in measure ABC: An argument of function "POWER" has the wrong data type or the result is too large or too small.".
How can I fix this in my DAX formula?
 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
 
            | User | Count | 
|---|---|
| 84 | |
| 49 | |
| 36 | |
| 31 | |
| 30 |