Forum Discussion
IF Statement - Power BI Desktop
- 10 years ago
Anonymous if you want to do this in Table View (after you've imported your Data) you use DAX like so
DAX => New Column = IF ( [Reference Status]="No", [Date], BLANK() )
if you want to do this during import in the Query Editor (just follow the picture)
Give the Column a Name and the conditions - the Query Editor will genetrate the column in M which is
M => if [Reference Status] = "No" then [Date] else ""
Anonymous if you want to do this in Table View (after you've imported your Data) you use DAX like so
DAX => New Column = IF ( [Reference Status]="No", [Date], BLANK() )
if you want to do this during import in the Query Editor (just follow the picture)
Give the Column a Name and the conditions - the Query Editor will genetrate the column in M which is
M => if [Reference Status] = "No" then [Date] else ""
I'm receiving this error in my DAX query on calculated column as follows:
Column = IF(Reading[ServiceId]=1, Reading[Value] , "On")
ERROR:
Function 'IF' is not allowed as part of calculated column DAX expressions on DirectQuery models
Any Idea why i'm receiving that error?