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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Calculate the % of the sum of a selection - if that makes any sense:)

Hi,
I have a column that contains about 10 categories, two of them are "Ambulante Begeleiding" and "Begeleiding Wijkteam". I am trying to calculate the %-"Begeleiding Wijkteam" of the total of the two. So if i look at Februari 2020 (please find table below) i have 148/(148+27)= 85% but the formula now calculates 148/162 = 91%
 
There are 162 distinct customers but 175 customers if you add the two seperate categories. I need the 175, how do i get that?
 
I tried a regular count but then (if you at the second table) the correction within the categorie also disappears, and that is the most important one for the data.
 
Hopefully an easy question, and thanks in advance for helping me out!
 
% begeleiding = DIVIDE(CALCULATE([# Distinct Active customers];FILTER(bron;bron[Categorie] = "Begeleiding Wijkteam"));CALCULATE([# Distinct Active customers]; FILTER(bron;bron[Categorie] IN {"Begeleiding Wijkteam"; "Ambulante begeleiding"})))
 
 

Overview customers.png

 
 
2 REPLIES 2
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

 

We can use the following measure to meet your requirement.

 

% begeleiding =
DIVIDE (
   CALCULATE ( [# Distinct Active customers]),
    CALCULATE (
       SUMX (CALCULATETABLE( VALUES ( 'Table'[Categorie] ),ALLSELECTED('Table')),  CALCULATE([# Distinct Active customers]))
      )
)

 

Then we can get the result like this,

 

34.png


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi,
Thanks for helping! Only thing is that It also returns the same (91%, instead of 84%) as i get from my measure.. 

 

I added your measure and then filtered the visual for the 2 categories.

 

Did i do something wrong?

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.

Top Solution Authors
Top Kudoed Authors