Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi All
I have a matrix visual with values that are numbers formated as text using the FORMAT() function. It works fine on PBI Desktop, but when I publish to the web, it shows several NaN errors. Why would this happen and how can I fix it?
This is one of the measures in the matrix:
Primary =
SWITCH( TRUE() ,
ISBLANK( [Primary Calc 2] ) , BLANK(),
MAX( Denomination[Index] ) = 4, FORMAT( [Primary Calc 2] , "#,##0.00 ;(#,##0.00);- " ),
MIN( Denomination[Denominator] ) = 1, FORMAT( [Primary Calc 2] , "#,##0 ;(#,##0);- " ),
MIN( Denomination[Denominator] ) = 1000, FORMAT( [Primary Calc 2] , "#,##0 ;(#,##0);- " ),
MIN( Denomination[Denominator] ) = 1000000, FORMAT( [Primary Calc 2] , "#,##0.0 ;(#,##0.0);- " ),
[Primary Calc 2]
)
Thank you for your help!
Hi @tony1,
I tested the same FORMAT formula, I didn't get NaN errors after publishing to service.
In your scenario, if you don't format the numeric values as Text, will issue persist in service? For further analysis, please post sample data and the DAX formula of [Primary Calc 2] and show us how is the Matrix look like. If possible, you could share your .pbix file.
Regards,
Yuliana Gu
Hi Yuliana
Thank you for your response. I couldn't format the values as anything other than text.
After playing around with the slicers on the report I realised that the issue arises when the number formatted is less than 1,000 and greater than zero.
Unfortunately, the pbix file contains sensitive data so I can't share publicly, but I could send it to you.
Regards
Tony