Forum Discussion
Display Infinity & NaN value as a text
Hello, Im newbie in power Bi community. I have a question to display Infinity & NaN as 2 different values.
Im using matrix to dislay gap (%) between actual volume & forecast volume. And I need to do conditioning format to display gap as below:
- If gap = Infitity, display "+"
- If gap = NaN, dispay "-"
I tried to use Divide but both Infinity & NaN value are display blank. What can I do to display as expected?
3 Replies
- v-yuta-msftCommunity Support
Hi linphan,
In power query, 0/0 or Number.NaN(0, 0) will display NaN, number/0 or Number.Nan(number, 0) will display Infinity.
But in DAX, the result is same with power query if you use symbol “/”, the result will be replaced by BLANK() if you use DIVIDE() function.
So you can use “/” instead and then use DAX below:
Column = SWITCH(Table1[Value], "Infinity", "+", "NaN", "-", Table1[Value])
Regards,
Jimmy Tao