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
Solved! Go to Solution.
@bbwong
Try the following measure:
CURRENT/DRAFT AGREEMENT FLAG =
VAR _A =
CALCULATE (
MAX ( 'Table3'[Client Id] ),
FILTER ( ALLEXCEPT ( 'Table3', 'Table3'[Client Id] ), 'Table3'[Agreement Status] IN {"Current","Draft"} ))
RETURN
IF ( _A <> BLANK () && HASONEVALUE(Table3[Client ID]), "Current/Draft Agreement", " " )
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@bbwong
Try the following measure:
CURRENT/DRAFT AGREEMENT FLAG =
VAR _A =
CALCULATE (
MAX ( 'Table3'[Client Id] ),
FILTER ( ALLEXCEPT ( 'Table3', 'Table3'[Client Id] ), 'Table3'[Agreement Status] IN {"Current","Draft"} ))
RETURN
IF ( _A <> BLANK () && HASONEVALUE(Table3[Client ID]), "Current/Draft Agreement", " " )
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Thanks - that worked.
@bbwong , Try like
CURRENT/DRAFT AGREEMENT FLAG =
VAR _A =
CALCULATE (
MAX ( 'Table 1'[Client Id] ),
FILTER ( 'Table 1', 'Table 1'[Agreement Status]= "Current" ), ALLEXCEPT ( 'Table 1', 'Table 1'[Client Id] ))
RETURN
IF ( _A <> BLANK (), "Current/Draft Agreement", " " )
Thanks for the quick response, the suggest calculated column is great to pick up where Agreement Status = Current.
However, it's not also flagging where Agreement Status = Draft.
Cheers,
Please see below table - hope this helps.
| Client ID | Agreement Status | Flag |
| 1234 | Current | Current/Draft Agreement |
| 2220 | Draft | Current/Draft Agreement |
| 1890 | Expired | |
| 2548 | Draft | Current/Draft Agreement |
| 1567 | Current | Current/Draft Agreement |
| 2876 | Expired |
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 37 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |