Forum Discussion
linphan
8 years agoFrequent Visitor
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...
v-yuta-msft
8 years agoCommunity 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
linphan
8 years agoFrequent Visitor
Hi Jimmy,
Switch function does not work. I got the error as below
"Function SWITCH does not support comparing values of type Number with value of type Text. Condider using VALUE or FORMAT to convert one of the values"
- linphan8 years agoFrequent Visitor
This is the screenshot