Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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!
@Bpark1994 , here's an extended model addressing your question. By choosing one or more tasks to test if a candidate is qualified or not; those who have all the chosen task(s) in the slicer are qualified.
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
measure=if(sumx({70,71},if([value] in values(table[task]),1))=2,"yes","no")
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
24 | |
20 | |
15 | |
12 |
User | Count |
---|---|
55 | |
48 | |
43 | |
19 | |
19 |