Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

REMOVEFILTERS, ALLEXCEPT, ALL etc not working as expected


I'm trying to do something that should be so simple...  I want to get the table below.  For my measures, I have the following:


measure1 = DISTINCTCOUNT(contacts[individualid])

measure2 = CALCULATE([measure1],ALLSELECTED(AgeBands[Age Band]))

measure3 = [measure1]/[measure2]


I'm happy that measure1 and measure3 are doing what they should, but measure2 is just giving me the same numbers as measure1, instead of giving me the total number of contacts in that region.  Annoyingly, I can easily get measure3 by using "% of column total" in a matrix visual, but I can't do that in a line chart, which is what I ultimately want to have.  My measure3 is currently just giving me 100% as measure1 and measure2 are identical.


My table visual is filtered on Region (there are other regions that I don't want to show in this analysis), and also one other field (let's call it Customer Type).  I've tried what feels like every permutation of ALL, ALLEXCEPT, ALLSELECTED, KEEPFILTERS, REMOVEFILTERS... I keep getting the same results.  Help!


Age BandRegion(measure1) - total contacts(measure2) - total contacts disregarding age band(measure3) - % of contacts in this region who fall into this age band
Under 20South2010020%
Under 20North405090%
Under 20West620



Helper I
Helper I

Any ideas, anyone?   I still don't understand why this isn't working as expected. 

Helper I
Helper I

Oh, and the age bands table is related to the contacts table - but I've also tried having a field for age bands on the contacts table itself (adding it in Power Query) and had the same problems.

Hi @s--turn ,


Another way to be independent of slicers is to create a calculated column. Here are the steps.

Create a measure.

Measure =
DISTINCTCOUNT ( AgeBands[individual id] )

Create two columns.

Column 1 =
    DISTINCTCOUNT ( AgeBands[individual id] ),
    FILTER ( 'AgeBands', 'AgeBands'[Region] = EARLIER ( AgeBands[Region] ) )
Column 2 =
DIVIDE ( [Measure], 'AgeBands'[Column 1] )

And you can also put them in a line chart.

Final output:



I attach my sample below for your reference.


Best Regards,
Community Support Team _ xiaosun

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-xiaosun-msft , thank you for replying.  I@ve tried that technique but unfortunately it still doesn't quite do what I need.  Please see images below.  The line chart, at first glance, looks better (Region is on the Legend), but when I convert it into a matrix, I can see that the figures for each Region do not add up to 100%.  What I'm trying to show is the relative distribution of ages in each region, so that we can say (for example) that Region X has a younger profile than Region Y.  

Screenshot 2022-11-24 124409.pngScreenshot 2022-11-24 124429.png

Helpful resources

Join Arun Ulag at MPPC23

Join Arun Ulag at MPPC23

Get a sneak peek into this year's Power Platform Conference Keynote.

PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Top Solution Authors