Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I am trying to express this condition in DAX.
Table.ImmunizationDate > Table.ConsentDate
They are located in different row context (different row).
But, both have common which is Step = 1
However, to distinguish two better,
ImmunizationDate has "Historical" as Consent
ConsentDate has "Refused" as Consent
Solved! Go to Solution.
Hey @JustinDoh1 ,
I'm not really sure how the result should look like. I just guessed you want to return a 1 if Table.ImmunizationDate > Table.ConsentDate and a 0 if not.
Try the following measure:
Immunization after Consent =
VAR vImmunization =
CALCULATE(
MAX( myTable[ImmunizationDate] ),
ALLEXCEPT(
myTable,
myTable[Step]
)
)
VAR vConsent =
CALCULATE(
MAX( myTable[ConsentDate] ),
ALLEXCEPT(
myTable,
myTable[Step]
)
)
RETURN
IF(
vImmunization > vConsent,
1,
0
)
Hey @JustinDoh1 ,
I'm not really sure how the result should look like. I just guessed you want to return a 1 if Table.ImmunizationDate > Table.ConsentDate and a 0 if not.
Try the following measure:
Immunization after Consent =
VAR vImmunization =
CALCULATE(
MAX( myTable[ImmunizationDate] ),
ALLEXCEPT(
myTable,
myTable[Step]
)
)
VAR vConsent =
CALCULATE(
MAX( myTable[ConsentDate] ),
ALLEXCEPT(
myTable,
myTable[Step]
)
)
RETURN
IF(
vImmunization > vConsent,
1,
0
)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 11 | |
| 10 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 32 | |
| 19 | |
| 12 | |
| 10 |