Forum Discussion
Bizo
4 years agoFrequent Visitor
DAX case if else from separate columns
Hi, Trying to use switch using conditions from separate columns but it's not working: Category = SWITCH ( TRUE(), (CONTAINSSTRING('vw_CAP_PreAudit_5Yrs_PN_BEF'[MAT], "07"),"Pole", ...
- 4 years ago
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
SpartaBI
Community Champion
4 years agoBizo 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