Forum Discussion

luxuror's avatar
luxuror
New Member
8 years ago
Solved

New Column Flag Based on Existing Column Content

Hello,    I'm trying to create a new column that flags as "1" or "Y" when existing column A has data. Column A populates dates but not all rows have dates. So the desired result would look like som...
  • v-xjiin-msft's avatar
    v-xjiin-msft
    8 years ago

    Hi luxuror,

     

    This is a DAX expression and it is used in Data Modeling.

     

    What you have done: entered it after going through the edit query option on the home tab and selecting add a custom column option. It is using Power Query not DAX. This is different. Also you should know that it is able to use if statement in Power Query. However Power Query is case sensitive, so if statement in Power Query is if not IF.

     

    Then for your scenario, there's no need to go to Edit Queries. Just go to Modeling pane -> choose New Column -> create this new calculated column with above DAX expression.

     

    Little tips: you should make some effort on DAX and Power Query in Edit Queries. :smileyhappy:

     

    Thanks,
    Xi Jin.