Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

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.


Chart is based on a count of occurences based on following conditions:

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: 

 

 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

  • v-easonf-msft's avatar
    v-easonf-msft
    Icon for Community Support rankCommunity Support

    Hi, Anonymous 

    Can you explain more specifically what is your expected result?

    Best Regards,
    Community Support Team _ Eason

     

    • Anonymous's avatar
      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: