Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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 something below:
Date | Flag |
1/1/2018 | Y |
2/3/2018 | Y |
3/13/2018 | Y |
2/2/2018 | Y |
3/1/2018 | Y |
Thank you!
Solved! Go to Solution.
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.
Thanks,
Xi Jin.
Hello @v-xjiin-msft and @popov,
I tried entering this equation but power bi did not recognize the IF statement and thought it was a name. I entered it after going through the edit query option on the home tab and selecting add a custom column option. I'm not sure if I just entered this in the wrong area.
Thank you
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.
Thanks,
Xi Jin.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
79 | |
74 | |
56 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |