Forum Discussion
Need Dax Help Please!
Hi guys,
Here is my starting table im pulling into power bi:
| User | Task |
| john | 70 |
| jim | 70 |
| john | 71 |
| john | 30 |
I want to write a dax function called Qualified that says if a user has both task 70 and task 71 then YES else NO
This is a simplified example but in some cases there will be many conditions being evaluated so just want to know the best way to write this dax function.
Desired end result:
| User | Qualified? |
| john | YES |
| jim | NO |
Thanks!
3 Replies
- nandic
Resident Rockstar
Hi,
Could you try this formula:
Concatenax Value =
VAR Concat =
CALCULATE (
CONCATENATEX ( 'Table', 'Table'[Task], "," ),
ALLEXCEPT ( 'Table', 'Table'[User] )
)
RETURN
IF (
AND ( CONTAINSSTRING ( Concat, "70" ), CONTAINSSTRING ( Concat, 71 ) ),
"Yes",
"No"
)Attached demo file.
Regards,
Nemanja Andic - wdx223_Daniel
Community Champion
measure=if(sumx({70,71},if([value] in values(table[task]),1))=2,"yes","no")