Forum Discussion
LYBridges
1 year agoFrequent Visitor
DAX returning 2 values when only 1 is selected
This is basically a DAX to abbreviate words to 1 or 2 letters and then list them and eliminate trailing commas. If only Pre-Risk is selected, it keeps returning "PR,R". It should just return "PR". ...
- 1 year ago
This is the solution that finally worked -
RQDel =SWITCH(TRUE(),CONTAINSSTRING('Pipeline'[Delegated Services], "Pre-Risk") && CONTAINSSTRING('Pipeline'[Delegated Services], ", Risk") && CONTAINSSTRING('Pipeline'[Delegated Services], ", Quality"), "PR, R, Q",CONTAINSSTRING('Pipeline'[Delegated Services], "Pre-Risk") && CONTAINSSTRING('Pipeline'[Delegated Services], ", Quality"), "PR, Q",CONTAINSSTRING('Pipeline'[Delegated Services], "Pre-Risk") && CONTAINSSTRING('Pipeline'[Delegated Services], ", Risk"), "PR, R",CONTAINSSTRING('Pipeline'[Delegated Services], "Risk") && CONTAINSSTRING('Pipeline'[Delegated Services], ", Quality"), "R, Q",CONTAINSSTRING('Pipeline'[Delegated Services], "Pre-Risk"), "PR",CONTAINSSTRING('Pipeline'[Delegated Services], "Risk"), "R",CONTAINSSTRING('Pipeline'[Delegated Services], "Quality"), "Q","")
v-hashadapu
Community Support
1 year agoHi LYBridges , Thank you for reaching out to the Microsoft Community Forum.
Please let us know if your issue is solved. If it is, consider marking the answers that helped 'Accept as Solution', so others with similar queries can find them easily. If not, please share the details.
Thank you.
LYBridges
1 year agoFrequent Visitor
This is the solution that finally worked -
RQDel =
SWITCH(
TRUE(),
CONTAINSSTRING('Pipeline'[Delegated Services], "Pre-Risk") && CONTAINSSTRING('Pipeline'[Delegated Services], ", Risk") && CONTAINSSTRING('Pipeline'[Delegated Services], ", Quality"), "PR, R, Q",
CONTAINSSTRING('Pipeline'[Delegated Services], "Pre-Risk") && CONTAINSSTRING('Pipeline'[Delegated Services], ", Quality"), "PR, Q",
CONTAINSSTRING('Pipeline'[Delegated Services], "Pre-Risk") && CONTAINSSTRING('Pipeline'[Delegated Services], ", Risk"), "PR, R",
CONTAINSSTRING('Pipeline'[Delegated Services], "Risk") && CONTAINSSTRING('Pipeline'[Delegated Services], ", Quality"), "R, Q",
CONTAINSSTRING('Pipeline'[Delegated Services], "Pre-Risk"), "PR",
CONTAINSSTRING('Pipeline'[Delegated Services], "Risk"), "R",
CONTAINSSTRING('Pipeline'[Delegated Services], "Quality"), "Q",
"")
- v-hashadapu1 year ago
Community Support
Hi LYBridges , Thanks for the update. We are happy to hear that you have resolved the issue. Thanks for sharing the details here. Please mark your insights 'Accept as solution' to help others with similar problems find it easily.
Thank you.