Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello:
Power Query newbie here.
I have a Query in Power Query.
There is a Column called "Start Date" and there is a column called "T-2" Date.
I would like to compare these two columns. If these two columns match in date, I would like to return a new column that states "Yes."
I am having trouble writing this. Something as simple as the below is giving me an error.
if [Start Date] = [T-2 Date] then yes else no
Solved! Go to Solution.
if you want to copare row by row, go to add column tab pick custom column tab in the oppened window use the next formula
if [Start Date] = [T-2 Date] then "yes" else "no"
but if you want to check the whole table once, use the next formula in a new step. (imagin your previous step name is Source)
Source[Start Date] = Source[T-2 Date]
if you want to copare row by row, go to add column tab pick custom column tab in the oppened window use the next formula
if [Start Date] = [T-2 Date] then "yes" else "no"
but if you want to check the whole table once, use the next formula in a new step. (imagin your previous step name is Source)
Source[Start Date] = Source[T-2 Date]
You need to put strings within quotes, unless you have defined yes and no as variables.
Also, you "T-2" Date column name looks strange with quotes around the first word and none around the second. So if that is not an error, your syntax is off.
User | Count |
---|---|
9 | |
7 | |
5 | |
5 | |
4 |
User | Count |
---|---|
14 | |
13 | |
8 | |
6 | |
6 |