Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

Count occurrences based on concatenated strings

Hey there,

Quetion, right of the bat: How do we count occurences based on threshold we have when values are concatenated?

Details:
So here's the situation: a donut chart has to be built.

PreacherBaby_0-1659511965651.png
Chart is based on a count of occurences based on following conditions:

PreacherBaby_1-1659512077757.png

Each phase has its own threshold, every threshold has its own color:

1. < 80% is red for all phases
2. 80-95 % for phases A and D
3. 80-99 % for phases B and C

 

In a table visual, we have measures that reflect upcoming phase and percentage of its readiness that is a main factor of making count: 

4.png

 

 It's easy to count occurencess based on their threshold when there is only one phase (like, if it's < 80%, it'll go as 1 point to "red" category". 
  But the problem is that there are times when phases are merged, and "readiness" measure here in table creates a concatenated string to display readiness ( 100%, 5.26%). 
These values might have different thresholds, that's why following condition is applied:
     - We assign a color based on the last value (i.e. if one is 100 and the second is 5.26 - we assign the color red, because we judge it by the last value).

thank you

2 REPLIES 2
v-easonf-msft
Community Support
Community Support

Hi, @Anonymous 

Can you explain more specifically what is your expected result?

Best Regards,
Community Support Team _ Eason

 

Anonymous
Not applicable

For Donut chart to display:
1) Count of Projects that are in green status - which are "Green Range" in table's above column
2) Count of Projects that are in yellow status - which are "Yellow Range" in table's above column
3) Count of Projects that are in red status - which are "Red Range" in table's above column

Complications: 
Some "Gates" in table visual (gates and their percentages in respective table columns are measures) are merged. (via comma ",") 

It means we have to judge it's status by the percentage that comes latest, in other words the ones that after coma ",".
- If percentage after comma does not meet "Min_Threshold" - its status should be red. 

- If percentage after comma does meet "Max_Threshold" - its status should be green.
- Everything's else status should be yellow. 

note: these are measures, not table columns:

PreacherBaby_0-1659955776063.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.