Forum Discussion
IF - True statement text
Hi everyone!
I'm just starting to work with Power BI.
In the desktop version, I've create new column (Calculated)
So what I need is to create a new column and put values acording to the first column.
ie:
Column A has numeric values, from 0 to 1000.
So I need to put in column B:
If Column A is lower than 500, put "Lower than 500", else "Higher than 500"
What I use is:
B = IF(Table[A]<500,"Lower than 500","Higher than 500")
But it doesn't work.
Any idea why?
27 Replies
- SeanCommunity Champion
Are you getting an error message? Can you elaborate a little more.
Because there's nothing wrong with the formula as you've described it.
- AnonymousNot applicable
Hi chrisgehm
Did you use the direct query mode to connect the datasource? If Dax formula still has the issue, I'd like to suggest you use power query formula.
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each if [Column] >5 then "Greate than 5" else "Less than 5")
Regards,
Xiaoxin Sheng