Forum Discussion
bbwong
Helper I
5 years agoCalculated Column Flag - 2nd Condition
I'm using the below with success however would like to add a 2nd condition to Agreement Status. How can I add a 2nd condition of Agreement Status of "Draft" to share the same "Current/Draft Agree...
- 5 years ago
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", " " )
amitchandak
Super User
5 years agobbwong , Not very clear. Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
bbwong
Helper I
5 years agoPlease 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 |