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

View all the Fabric Data Days sessions on demand. View schedule

Reply
E_K_
Helper III
Helper III

How to get the percentile calculation to ignore any filter from one column

I have this measure, I need the percentile lines on visuals to stay constant even if any filters are applied (other than [Start Time], which is needed for the visual. This is so that we can see if a client falls above/below certain constant percentile values when selected. I need it somewhere in the RETURN part but I can't figure out how

 

Help! 

 

75th Percentile =
VAR SummaryTable =
    SUMMARIZE (
        'Incidents',
        'Incidents'[Client],
        "Distinct ID Count", CALCULATE(DISTINCTCOUNT('Incidents'[ID]), ALL('Incidents'[Client])))

        RETURN
    PERCENTILEX.INC (
        SummaryTable,
        [Distinct ID Count],
        0.75)
4 REPLIES 4
E_K_
Helper III
Helper III

I find replacing all with allexcept in the summary table variable definition shows the wrong value.

 

I have tried adding on to the end of the return function as well however the percentile values shift when I filter on client:

       RETURN
    CALCULATE(PERCENTILEX.INC (
        SummaryTable,
        [Distinct ID Count],
        0.75), ALLEXCEPT('Incidents', 'Incidents[Client])
 
Can you help by providing an exact answer? I have been trying to get this for a couple weeks now and have tried all sorts, I wanna cry!
Just to note - I want this value to show in visuals that will only ever be cut by [Start Time] as there are other filters I may want to apply to the graphs that filter it and again, I want the percentile value output to stay constant (it is to show if something with a filter falls above/below those lines)


example below,I want to be able to filter on [Client] to show thier incident volume and compare to the percentile lines: 
E_K__0-1679922175806.png

 

Your chart title says "Incident volume per client"  but the chart doesn't seeem to have a client dimension. 

 

I think you are trying to do too much with a single chart.  Maybe refactor your requirement.

 

BTW, the ALLEXCEPT should go into the Summary table, not the return statement.

Thanks I added the ALLEXCEPT and it calculated the total number of incidents experienced by clients per month, not the 75th percentile taking into account all clients experiencing that incident that month how many each experienced).

 

That's why I'm certain that we are to not use allexcept (in at least the definition of "Distinct count of ID") as that summary table is to show the total number of incidents per client on purpose, so using ALLEXCEPT flattens the table into only producing the total for all clients, not per each.

 

To clarify - in all below screenshots the allexcept condition is only in the "Top 25%" measure, not in others, as I have tested the numbers for the others and they are correct on an unfiltered graph.

See below with your suggestion.

 
75th Percentile =
VAR SummaryTable =
    SUMMARIZE (
        'Incidents',
        'Incidents'[Client],
        "Distinct ID Count", CALCULATE(DISTINCTCOUNT('Incidents'[ID]), ALLEXCEPT('Incidents','Incidents'[Client])))

        RETURN
    CALCULATE(PERCENTILEX.INC (
        SummaryTable,
        [Distinct ID Count],
        0.75))Produces below

E_K__4-1679925876008.png

 

 

Filtered on client X: 

E_K__3-1679925773231.png


Re@ trying to do too much with a single chart I disagree. Its quite simple - keeps the percentile lines constant and have the bars update to whatever filter you apply (for this case, [Client]).

 

The idea is to use a separte [Client]filter to filter this graphs (and other by other dimensions - once I have the measure locked for this one I will apply the same logic for all the others).

The bars in the screenshot are to represent the incident volume and you filter on the client to have the graph update - it does not need a client dimension as we want to look monthly at specific clients not all clients at once.

 

Unfiltered:

E_K__1-1679925551446.png

 

Filtered on client X (but the percentile values change, we only want the bars to change so we need this defined in the percentile measures). I think it is only counting incidents where the client shows up as one of those impacted so that's why I think your suggestion is along the right lines but doesn't do the whole job:

E_K__2-1679925670934.png

 

 

Does this make sense? 


If you still think what I am asking is too complex, what would you advise as an alternate way of showing the same things for my case?  Trying to be imaginative here but not really getting anywhere

lbendlin
Super User
Super User

instead of ALL use ALLEXCEPT

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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