Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi,
I am looking for help to run this code:
= Table.AddColumn(#"Removed Columns2", "Custom", each if [#"Who is your Teacher?"] = "Sister Paulette Kirkham" and [Start Date] < 9/16/2020 then "Greg Hazard" else [#"Who is your Teacher?"])
The one condition is a text format and the other is date format which is why I believe it is not working.
Looking forward to learning.
Thanks in advance.
Nate.
Solved! Go to Solution.
@Natedekock you have to type dates using the #date() function, so the below should work. You were comparing a date to 9 divided by 16 divided by 2020. It is jus like Excel's DATE() function, but it is #date() and is case sensitive.
= Table.AddColumn(#"Removed Columns2", "Custom", each if [#"Who is your Teacher?"] = "Sister Paulette Kirkham" and [Start Date] < #date(2020,9,16) then "Greg Hazard" else [#"Who is your Teacher?"])
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI Reporting@Natedekock you have to type dates using the #date() function, so the below should work. You were comparing a date to 9 divided by 16 divided by 2020. It is jus like Excel's DATE() function, but it is #date() and is case sensitive.
= Table.AddColumn(#"Removed Columns2", "Custom", each if [#"Who is your Teacher?"] = "Sister Paulette Kirkham" and [Start Date] < #date(2020,9,16) then "Greg Hazard" else [#"Who is your Teacher?"])
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingWorked like a charm!
Thank you.
Beautiful @Natedekock - glad I was able to help.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingA new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 10 | |
| 8 | |
| 7 | |
| 5 |