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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
f_r_1998
Helper I
Helper I

deleted

deleted

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@f_r_1998 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.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.