Forum Discussion
HenryJS
6 years agoPost Prodigy
Measure: If column has
Hi all, How do I create a column which: If 'Candidate' has 'Candidate Declaration' & 'CIS Verification' THEN Yes
- 6 years ago
HenryJS , Can you provide sample data
v-alq-msft
6 years agoCommunity Support
Hi, HenryJS
Based on your description, I created data to reproduce your scenario.
Table:
You may create a measure as below.
Yes/No =
var _candidate = SELECTEDVALUE('Table'[Candidate])
return
IF(
ISFILTERED('Table'[Candidate]),
IF(
AND(
COUNTROWS(
FILTER(
ALLSELECTED('Table'),
'Table'[Candidate] = _candidate&&
'Table'[Document] = "Candidate Declaration"
)
)>0,
COUNTROWS(
FILTER(
ALLSELECTED('Table'),
'Table'[Candidate] = _candidate&&
'Table'[Document] = "CIS Verification"
)
)>0
),
"Yes",
"No"
)
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.