Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
10 years ago
Solved

IF Statement - Power BI Desktop

Hi everyone,      I have a simple question and wantes some assitance. I have two columns (Reference Status and Date) in my dataset and wanted to create a simply IF statement. I want the IF stateme...
  • Sean's avatar
    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 ""