Forum Discussion

harirao's avatar
harirao
Icon for Post Prodigy rankPost Prodigy
4 years ago
Solved

NaN to replace with 0

Hi All,
Required your help, i have created a Measure included ISBLANK function still getting "NaN" for few rows, below dax and snapshot for your reference.

TEST % =
if(isblank(DISTINCTCOUNT(RawData[Opportunity ID])),0,DISTINCTCOUNT(RawData[Opportunity ID])) /
if(ISBLANK(calculate(SUMX(VALUES(RawData[Status_New]), (RawData[DISTINCTCOUNT])), ALLSELECTED(RawData[Status_New]))),0,
calculate(SUMX(VALUES(RawData[Status_New]), (RawData[DISTINCTCOUNT])), ALLSELECTED(RawData[Status_New])))


Required your assistance to solve this error.
 
Thank you
 
Regards,
Hari
  • Hi,

    You can use IFERROR to get around this. So IFERROR([Measure],0)

    I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!


1 Reply

  • ValtteriN's avatar
    ValtteriN
    Icon for Community Champion rankCommunity Champion

    Hi,

    You can use IFERROR to get around this. So IFERROR([Measure],0)

    I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!