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.
Hi, I'm a little stuck here, I'm trying to compare a date column to see if the dates are the same, but only if a value in a one column first exists in another column.
All columns are on the same table.
Example
Step 1 - I want to see if the value in Parent Order# column exists in Order# column.
Step 2 - If it does I want to see if the Dates are the same.
Step 3 - Add a new column called match with Yes or No.
Order# | Parent Order# | Date | Match |
A12345 | 02/07/2025 | No | |
A12346 | A12345 | 02/07/2025 | Yes |
A12347 | B12346 | 02/01/2025 | Yes |
A12348 | 02/04/2025 | No | |
B12345 | A12345 | 02/08/2025 | No |
B12346 | 02/01/2025 | No | |
B12347 | 02/04/2025 | No | |
B12348 | A12345 | 02/04/2025 | No |
c12345 | 02/04/2025 | No | |
c12346 | 02/04/2025 | No | |
c12347 | B12346 | 02/01/2025 | Yes |
c12348 | 02/04/2025 | No |
Solved! Go to Solution.
Try this calculated column:
Match =
VAR vParentOrder = 'Table'[Parent Order#]
VAR vDate = 'Table'[Date]
VAR vTable =
FILTER (
'Table',
'Table'[Order#] = vParentOrder
&& 'Table'[Date] = vDate
)
VAR vResult =
IF ( ISEMPTY ( vTable ), "No", "Yes" )
RETURN
vResult
Proud to be a Super User!
Try this calculated column:
Match =
VAR vParentOrder = 'Table'[Parent Order#]
VAR vDate = 'Table'[Date]
VAR vTable =
FILTER (
'Table',
'Table'[Order#] = vParentOrder
&& 'Table'[Date] = vDate
)
VAR vResult =
IF ( ISEMPTY ( vTable ), "No", "Yes" )
RETURN
vResult
Proud to be a Super User!
Thank you 👍
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |