Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (17.6k points)
I get Nan,#Error, Infinity values in preview when I use calculation in report generation, I wanted to avoid this and show" "if the calculation result is null or infinite.

Please let me know how to avoid"-1" and "infinity" and "# Error" during report display.

Whenever I see the preview NAN values are shown and the remaining fields indicate correct question results such as percentage values Like 98 percent.00 somewhat but I have a problem with the values"-1" and "infinity" and "# Error" I have to adjust those values to"

1 Answer

0 votes
by (47.2k points)

You often get these errors appearing in percentage calculations because of dividing by zero / null problems. It may take care to add phrases like the following (vary depending on what your percentage measurement is).

For null:

=IIF(Fields!Denominator.Value Is Nothing, "", (Fields!Numerator.Value - Fields!Denominator.Value) / Fields!Denominator.Value)

For zero:

=IIF(Fields!Denominator.Value = 0, "", (Fields!Numerator.Value - Fields!Denominator.Value) / Fields!Denominator.Value)

Check out Msbi certification training that enables you to master MSBI tools like SSIS, SSRS, and SSAS using SQL Server. 

Related questions

0 votes
1 answer
asked Feb 3, 2020 in BI by Vaibhav Ameta (17.6k points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Feb 27, 2020 in BI by Vaibhav Ameta (17.6k points)
0 votes
1 answer
asked Feb 27, 2020 in BI by Vaibhav Ameta (17.6k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...