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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

Count with filters

Hi,

 

I've been trying to find a solution with the below scenario. I hope someone can help.

 

I have the following data:

 

NameLocal GradeCountry
Salameh, MarioPartnerUSA
Berlin, MartinPartnerUSA
Khan, JawadPartnerUK
Mackenzie, Karl SSenior ManagerSpain
Masry, Raed ASenior ManagerUSA
Ghanghro, Mossadiq AManagerSpain
Bhatt, MihirManagerUK
Sobh, Mohamad ASeniorSpain
Hussein, Omar ZSeniorUSA
Karmakar, AnirbanJuniorUK
Mcpheator, Craig AJuniorUSA
Zabalawi, Zaid HJuniorSpain

 

I have a slicer for Local Grade, and what I am trying to do is that when I filter on partners for example I want to see the percentage of partners in comparison to all other local grades for each country alone ( Not as a percentage of partners across all countries)

 

So If I select on Partner I should get the following:

 

USA 40 %

UK  33.3 %

Spain 0 %

 

What I did was that I used the following measure:

measure = CALCULATE(COUNTROWS(FILTER(Sheet3, Sheet3[Local Grade] = "Partner")))
 
 and then I divide  this measure by the total number of rows in sheet 3
 
But this will always give me the percentage of partners in each country even if I change the slicer to senior manager.

 

 

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous

 

Something like this may be

 

Measure =
DIVIDE (
    COUNT ( Table1[Country] ),
    CALCULATE ( COUNT ( Table1[Country] ), ALL ( Table1[Local Grade] ) )
)

View solution in original post

1 REPLY 1
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous

 

Something like this may be

 

Measure =
DIVIDE (
    COUNT ( Table1[Country] ),
    CALCULATE ( COUNT ( Table1[Country] ), ALL ( Table1[Local Grade] ) )
)

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.