Forum Discussion

2 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Anonymous Sorry, having trouble following, can you post sample data as text and expected output?
    Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

    Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

    The most important parts are:
    1. Sample data as text, use the table tool in the editing bar
    2. Expected output from sample data
    3. Explanation in words of how to get from 1. to 2.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Greg, thanks for getting back to me. Let me try to explain my problem better to you. Basically I have to add a KPI, but let me give you some context first:

       

      I have a data set that includes provinces, hospitals and a score for every hospital (the score is a measure I have already calculated (Score Patient Journey)). 

      Province

      Hospital

      Score Patient Journey (measure)

      AD0.1
      AE0.5
      AF0.8
      BG0.6
      CH1

       

      In the dashboard I have a slicer with the Provinces and underneath a table that shows all hospitals within the selected provinces and their scores.

      The hospitals can be grouped in three different groups, depending on their score. So a hospital would belong to the first group if its score is >=0 and <0.5. A hospital would belong to the second group if its score is >= 0.5 and <0.6. And the third group includes hospitals that have a score >= 0.6.

       

      Now I need to add a KPI for the third group.  This KPI should show the percentage of hospitals that belong to the third group compared to all hospitals within the province selected. 

      In easier words, if province A is selected in the slicer, the KPI should show:  [Number of Hospitals belonging to the third group in province A] / [Number of all hospitals belonging to province A]

      -> taking the sample data from the table above it would mean 1 / 3 = 0.333, since we have one hospital belonging to the thrid group out of the three hospitals in that province.

      If province B is selected in the slicer, the KPI should show 1/1 = 1, since there is only one hospital in this province and it belongs to the third group.

      Another thing that is crucial is that, when the users clicks a hospital in the table, the KPI should not change. It should solely depend and be filtered on province.

       

      I hope explanation is better to understand. let me know if you need more info. Thank you for your help!