Forum Discussion

MojoGene's avatar
MojoGene
Icon for Post Patron rankPost Patron
10 years ago
Solved

"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.

  • 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.

     

     

     

    Regards,

4 Replies

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

  • v-sihou-msft's avatar
    v-sihou-msft
    Icon for Microsoft Employee rankMicrosoft 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.

     

     

     

    Regards,

    • MojoGene's avatar
      MojoGene
      Icon for Post Patron rankPost Patron

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

  • PBIuser01's avatar
    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