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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ilcaa72
Helper IV
Helper IV

Error in Dax formula

i have a Dax formula that I use successfully in a bar chart with region data, BUT when i try to use it with a different category (Countries) it "cant display the visual"... im having trouble trying to troubleshoot the source of the error, can someone take a look? https://1drv.ms/u/s!AiL3mI_trBnxgxDFo4oupkQnbvFU

 

Dax error.jpg

1 ACCEPTED SOLUTION
Phil_Seamark
Microsoft Employee
Microsoft Employee

HI @ilcaa72

 

Your formula is fine, the problem is your data is causing the function to overflow.  If you wrap some crude error handling around your RETURN statement as follows

 

return 
  iferror(if (blank(),0,((SubNow/Sub6yrsAgo)^(1/3))-1),"Has Error")   

You will see that two rows have issues

 

image.png

 

Neither of these has a value for the Sub6yrsAgo, so the divide fails

 

Another option is to use the DIVIDE function to gracefully handle the issue

 

return 
  if (blank(),0,(DIVIDE(SubNow,Sub6yrsAgo,blank())^(1/3))-1)  

 

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

1 REPLY 1
Phil_Seamark
Microsoft Employee
Microsoft Employee

HI @ilcaa72

 

Your formula is fine, the problem is your data is causing the function to overflow.  If you wrap some crude error handling around your RETURN statement as follows

 

return 
  iferror(if (blank(),0,((SubNow/Sub6yrsAgo)^(1/3))-1),"Has Error")   

You will see that two rows have issues

 

image.png

 

Neither of these has a value for the Sub6yrsAgo, so the divide fails

 

Another option is to use the DIVIDE function to gracefully handle the issue

 

return 
  if (blank(),0,(DIVIDE(SubNow,Sub6yrsAgo,blank())^(1/3))-1)  

 

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.