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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
TijmenJDekkers
Frequent Visitor

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 @TijmenJDekkers ,

 

 

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.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors