Hello, having an issue with NaN values when there is an attempt to divide 0 by 0. I have two datasets, a year-to-date (YTD) and month-to-date(MTD). In this expression I want to get the number of tickets not breached and divide by the total number of tickets. In my datasets the field that hold this info is the im_is_breached.Value which can either be 0 for false, 1 for true, or empty meaning no tickets.
The following gives me the NaN warning when there are 0 tickets for both sides of the express. I can't figure out a syntax that would work with this to get around the NaN's. Anyone have an idea?
=(Count(IIF(Lookup(Fields!im_id.Value,Fields!im_id.Value,Fields!im_is_breached.Value,"MTD")="0",1,Nothing)))
/
(Count(IIF(Lookup(Fields!im_id.Value,Fields!im_id.Value,Fields!im_is_breached.Value,"MTD")="1",1,Nothing))
OR
Count(IIF(Lookup(Fields!im_id.Value,Fields!im_id.Value,Fields!im_is_breached.Value,"MTD")="0",1,Nothing)))
An example of the complete table results are below. This express is used in the total row and % Met column, you can see when MTD and Breached are 0 it gives me the Nan but otherwise seems to work.
Group AMTD Breached% MetCritical | 0 | 0 | 0.0% | ||
Totals | 0 | 0 | NaN | ||
Group B | Critical | 1 | 0 | 100.0% | |
High | 2 | 2 | 0.0% | ||
Low | 0 | 0 | 0.0% | ||
Medium | 0 | 0 | 0.0% | ||
Totals | 3 | 2 | 33.3% |