Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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".
Solved! Go to Solution.
This is the solution that finally worked -
Hi @LYBridges , Please let us know if your issue is solved. If it is, consider marking the answer that helped 'Accept as Solution', so others with similar queries can find it easily. If not, please share the details.
Thank you.
Hi @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.
This is the solution that finally worked -
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.
Hi @LYBridges
Make sure to include a space before and after Risk so it becomes " Risk "
RQDel =
CONCATENATEX (
FILTER (
ADDCOLUMNS (
{ ( 1, "Pre-Risk", "PR" ), ( 2, " Risk ", "R" ), ( 3, "Quality", "Q" ) },
"@Result", IF ( CONTAINSSTRING ( Pipeline[Ops Delegated Services], [Value2] ), [Value3] )
),
NOT ISBLANK ( [@Result] )
),
[@Result],
",",
[Value1], ASC
)
Thanks for a new take on this!
I tried it out and these are the results based on what is currently in the data source.
Correct returned values -
If the source column has Pre-Risk, it correctly returns PR.
Incorrect returned vaules -
If the source coulmn has all 3, it returns only PR,Q.
If the source column has Pre-Risk and Risk, it returns only PR
If the source column has Risk and Quality, it returns only Q.
If the source column has Risk, it returns a blank.
I have a multi-select/mulit-choice column that can have any combination of 18 different choices.
For the new column/DAX I'm trying to create, we are only interested in the choices Pre-Risk, Risk and/or Quality.
For each row, we want to know which one or which combination of choices were selected. Due to limited space, we are trimming down to just abbreviations (PR, R, Q).
So the new column will have one or any combination of PR, R, Q displayed based on the multi-select column in the source.
Depending on how Risk is written in the source. It might be " Risk" or " Risk,". This is something you can find out by looking at some values of the source column.
It shows up as " Risk,".
I'll try that.
Thanks so much. Love the approach.
Hi @LYBridges please check this
I spoke too soon. This now returns too few values.
Incorrect returned value -
If the source coulmn has all 3, it is only returning Q.
If the source column has Pre-Risk and Risk, it returns no abbreviation.
Correct return values
If the source column has Risk and Quality, it correctly returns R,Q.
If the source column has Pre-Risk, it correctly returns PR.
If the source column has Risk, it correctly returns R.
I have a multi-select/mulit-choice column that can have any combination of 18 different choices.
For the new column/DAX I'm trying to create, we are only interested in the choices Pre-Risk, Risk and/or Quality.
For each row, we want to know which one or which combination of choices were selected. Due to limited space, we are trimming down to just abbreviations (PR, R, Q).
So the new column will have one or any combination of PR, R, Q displayed based on the multi-select column in the source.
Hi @LYBridges please check this then
@LYBridges Well, yeah, because "Pre-Risk" also contains the word "Risk" so that's the logical outcome of what you have coded. The real question, what do you actually expect the output to be and can you provide sample data?
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
23 | |
10 | |
10 | |
9 | |
7 |