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.
I have a table Projects like this
Project |
Start Date |
This has a many to one relationship with the table Milestones like this
Project |
Milestone Name |
Milestone Date |
I want to compare Start Date in the Projects table to Milestone Date in the Milestones table where Milestone Name = “Example”. If they are the same return “Same” if they are different return “Diff”
I’ve tried writing this in Dax but I just can’t figure it out – can anyone help?
Solved! Go to Solution.
Hi @DanAub ,
Please follow these steps:
(1)This is my test data :
(2) Create a measure to judgment
judgment =
VAR _time =
MAXX (
FILTER ( Milestones, Milestones[Milestone Name] = "Example" ),
Milestones[Milestone Date]
)
VAR _time2 =
MAXX (
FILTER ( Projects, Projects[Porject] = MAX ( Milestones[Project] ) ),
Projects[StarDate]
)
RETURN
IF ( _time = _time2, "Same", "Diff" )
(3) The result is as follows :
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the question.
Best Regards,
Gallen Luo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @DanAub ,
Please follow these steps:
(1)This is my test data :
(2) Create a measure to judgment
judgment =
VAR _time =
MAXX (
FILTER ( Milestones, Milestones[Milestone Name] = "Example" ),
Milestones[Milestone Date]
)
VAR _time2 =
MAXX (
FILTER ( Projects, Projects[Porject] = MAX ( Milestones[Project] ) ),
Projects[StarDate]
)
RETURN
IF ( _time = _time2, "Same", "Diff" )
(3) The result is as follows :
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the question.
Best Regards,
Gallen Luo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
CalculatedColumn=IF(MINX(FILTER(RELATEDTABLE(Milestones),Milestones[Milestone Name]="Example"),Milestones[Milestone Date])=Projects[Start Date],"Same","Diff")
Measure=VAR _sd=MAX(Projects[Start Date]) RETURN IF(CALCULATE(MIN(Milestones[Milestone Date]),Milestones[Milestone Name]="Example")=_sd,"Same","Diff")
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
10 | |
7 | |
6 | |
6 |
User | Count |
---|---|
30 | |
11 | |
11 | |
10 | |
6 |