Forum Discussion
Kaalbartje2
3 years agoFrequent Visitor
Nested IF in Dax or M
Hello, I searched but I couldn't find the solution what my problem is. I have different department in a column and I have a specialism in another. I want to specify when a specialism is wrong i...
- Anonymous3 years ago
Hi Kaalbartje2 ,
Please have a try.
Create a column.
column = IF ( 'table'[department] = "Department A" && 'table'[specialism] = "cardio", TRUE (), IF ( 'table'[department] = "Department B" && ( 'table'[specialism] = "cardio" || 'table'[specialism] = "pulmo" ), TRUE (), IF ( 'table'[department] = "Department C" && ( 'table'[specialism] = "pulmo" || 'table'[specialism] = "KNO" || 'table'[specialism] = "anest" ), TRUE (), FALSE () ) ) )If I have misunderstood your meaning, please provide more details with your desired output and pbix file without privacy information.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Kaalbartje2
3 years agoFrequent Visitor
Hi v-polly-msft,
Looking good, I'll give it a try on my real dataset which it's more complex. But when I see the result on department C I have really good hope.
I'll let you know! Tnx!!
Kaalbartje2
3 years agoFrequent Visitor
Anonymous It works perfectly. Tnx. I marked it as the solution.