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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
DominikLejeune
New Member

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
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors