1

I have dataset in Power BI which is displaying n/a in some fields. I have connected Power BI dataset with Power BI report builder and I need to handle n/a in report builder. So if the value is n/a I need to display n/a else I need to round off the value to 1 decimal places.

I have written an expression as follows:

=IIF(Fields!Year5.Value="n/a", Fields!Year5.Value, FormatNumber(Fields!Year5.Value,1))

For number value, I am able to round off the number just fine but the "n/a" part is not showing as "n/a" but showing "#Error" when the report is executed.

xorpower
  • 17,975
  • 51
  • 129
  • 180

1 Answers1

0

I'd guess it's having trouble with the equality condition due to a data type mismatch.

See if this works better:

=IIF(IsNumeric(Fields!Year5.Value), FormatNumber(Fields!Year5.Value,1), "n/a")
Alexis Olson
  • 38,724
  • 7
  • 42
  • 64