Forum Discussion

nataliesmiy1357's avatar
2 years ago
Solved

Custom if statement for Percentages

Hello!  I am trying to track the percentage of downtime minutes.

 

I have a calculation for a specific time / total time.  But some columns just have zeros, so I am getting a bunch of answer/results of "NaN"

 

How is it possible to create an if statment to make the NaN values 0?

  • You can adjust your measure

     

    Measure  = IF(SUM('Table'[SpecificTime])=0,0,DIVIDE(SUM('Table'[SpecificTime]),SUM('Table'[TotalTime])))

1 Reply

  • You can adjust your measure

     

    Measure  = IF(SUM('Table'[SpecificTime])=0,0,DIVIDE(SUM('Table'[SpecificTime]),SUM('Table'[TotalTime])))