Forum Discussion
DAX case if else from separate columns
Hi,
Trying to use switch using conditions from separate columns but it's not working:
Bizo you mean like this?
Category = SWITCH ( TRUE(), CONTAINSSTRING('vw_CAP_PreAudit_5Yrs_PN_BEF'[MAT], "07"),"Pole", CONTAINSSTRING('vw_CAP_PreAudit_5Yrs_PN_BEF'[Work Type Code],"HNA"),"Vegetation", "Non-Pole", )
In case it answered your question, please accept the solution to help other members find it. Appreciate Your Kudos.
SpartaBI Logo
Visit SpartaBI website Visit SpartaBI Linkdin Visit SpartaBI Facebook
Showcase Report – Contoso By SpartaBI
3 Replies
- BizoFrequent Visitor
Thanks!
- SpartaBI
Community Champion
Bizo my pleasure 🙂
Will appreicate your Kudos 🙂
P.S. Check out my showcase report - got some high level stuff there. Sure you will find there a lot of cool ideas.
https://community.powerbi.com/t5/Data-Stories-Gallery/SpartaBI-Feat-Contoso-100K/td-p/2449543
Give it a thumbs up over there if you liked it 🙂
- SpartaBI
Community Champion
Bizo you mean like this?
Category = SWITCH ( TRUE(), CONTAINSSTRING('vw_CAP_PreAudit_5Yrs_PN_BEF'[MAT], "07"),"Pole", CONTAINSSTRING('vw_CAP_PreAudit_5Yrs_PN_BEF'[Work Type Code],"HNA"),"Vegetation", "Non-Pole", )
In case it answered your question, please accept the solution to help other members find it. Appreciate Your Kudos.
SpartaBI Logo
Visit SpartaBI website Visit SpartaBI Linkdin Visit SpartaBI Facebook
Showcase Report – Contoso By SpartaBI