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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
MojoGene
Post Patron
Post Patron

"NaN" on the Dashboard

I have a rather simple measure that compares the percentage rise (fall) in current year net proit against the prior year:

 

2016-2015 Net Profit % Increase (Decrease) = FORMAT((GLSACCOUNT[2016 Net Income]-GLSACCOUNT[2015 Net Income]) / GLSACCOUNT[2015 Net Income], "Percent")

This works fine in the online Report properly showing the percent increase/decrease, but when I pin it to the Dashboard it shows "NaN" which, to my understanding, means, "not a number."

 

Any thoughts on why I am seeing this behavior?

 

Thanks.

1 ACCEPTED SOLUTION
v-sihou-msft
Employee
Employee

@MojoGene

 

Format function will convert number into text so that it will show "NaN" error. In this scenario, please format your calculated measure within Power BI Desktop Modeling. It will work properly when pinning onto dashboard.

 

Capture2323.PNG

 

Capture4545.PNG

 

Regards,

View solution in original post

4 REPLIES 4
PBIuser01
Frequent Visitor

Also,  consider using the DIVIDE function. this provides an automate trap for divide by zero problems.

this and the pre-listed formating should provide a nice result

prabhakaran
New Member

Average= IF(ISERROR([CurentMonth]+[Avarage_Last_Month]+[Avarage_year_To_Date])=TRUE,0,[CurentMonth]+[Avarage_Last_Month]+[Avarage_year_To_Date])

v-sihou-msft
Employee
Employee

@MojoGene

 

Format function will convert number into text so that it will show "NaN" error. In this scenario, please format your calculated measure within Power BI Desktop Modeling. It will work properly when pinning onto dashboard.

 

Capture2323.PNG

 

Capture4545.PNG

 

Regards,

Thanks! In retrospect, this should have been obvious to me. It's all fixed now.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Kudoed Authors