Forum Discussion
ilcaa72
8 years agoHelper 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 t...
- 8 years ago
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
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)
Phil_Seamark
8 years agoMicrosoft 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
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)