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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
DominikLejeune
Regular Visitor

Total % of column with dynamic filter (I'm getting crazy)

Hello,

I need help. I have turn it around every way and I just cannot find the solution.

I want my chart to have a filter %total collumn according to the collumn total unfiltred.

In the chart below, i have to column ID_BPEI (1.5m row). I do a first filter with DistinctCount (56k total distinct over the 6 column).

When I use my slicer and filter the ID_BPEI according to a score, I want the column to show the following %:
Distinct ID_BPEI filtered by the slicer/Disctinct ID_BPEI total of the column only
Ex. : 2019-2020 total column is 11 302. Lets say I use my slicer and it get the value down to 6k, I want to % to be 6k/11 302 and not 6K/Total of all the column.


How can I do that?

 

Capture d’écran 2025-03-14 222934.png

 

1 ACCEPTED SOLUTION
BIswajit_Das
Super User
Super User

Hello @DominikLejeune
Please try this out;
Create a measure with the below attached DAX and use it in the visual

Measure =
VAR _val = DISTINCTCOUNT('Table'[ID_BPEI]) // Replace 'Table' with your table name
VAR _total =
CALCULATE(
    DISTINCTCOUNT('Table'[ID_BPEI]),
    REMOVEFILTERS('Table'[SCORE_ODD_TOTAL])
)

RETURN
DIVIDE(_vaL, _total)


Check if it's working for your data or not.

If it does not work or there's any issues than share a demo data which can be more helpfull to figure this out.

Thanks & Regards

View solution in original post

2 REPLIES 2
danextian
Super User
Super User

Hi @DominikLejeune 

 

Based on the data provided, try this:

DIVIDE (
    [count measure],
    CALCULATE (
        [count measure],
        ALLEXCEPT ( 'table', 'table'[ANNEE_UNIVERSITAIRE_DIPLOMATION] )
    )
)

Otherwise, we will need  more information. Please refer to this post and follow the guide - https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447... 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
BIswajit_Das
Super User
Super User

Hello @DominikLejeune
Please try this out;
Create a measure with the below attached DAX and use it in the visual

Measure =
VAR _val = DISTINCTCOUNT('Table'[ID_BPEI]) // Replace 'Table' with your table name
VAR _total =
CALCULATE(
    DISTINCTCOUNT('Table'[ID_BPEI]),
    REMOVEFILTERS('Table'[SCORE_ODD_TOTAL])
)

RETURN
DIVIDE(_vaL, _total)


Check if it's working for your data or not.

If it does not work or there's any issues than share a demo data which can be more helpfull to figure this out.

Thanks & Regards

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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