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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
carinat
Advocate II
Advocate II

The opposite filter of ALLEXCEPT - exclude one filter in measure

I'm trying to create a measure that gives me the percentage within groups. The following formula is working like a charm until I start slicing or cross-filtering:

Measure = DIVIDE(COUNT(data[Respondent]),CALCULATE(DISTINCTCOUNT(data[Respondent]),ALL(data)))

What I would like is a function that only ignores one column in my data when filtering, i.e. only the column which contains the categories I'm trying to create a percentage of. I want kind of a %GT effect but one that amounts to more than 100% (therefore, I don't use the build-in quick calc at the graph level) since the respondents can have selected several categories.

 

Any suggestions?

7 REPLIES 7
Anonymous
Not applicable

calculateCOUNT(Main_data_set[column_x]) ALLSELECTED(Main_data_set), REMOVEFILTERS(Main_data_set[column_y]) )
pdelia
Advocate I
Advocate I

Replying to this old thread because it came up in a search for me. DAX now has a REMOVEFILTERS function which I believe accomplishes what this is asking about (and certainly works in the case I was dealing with).

Thank you, was looking for exactly this.

BetterCallFrank
Resolver IV
Resolver IV

Hi @carinat

 

have you tried:

 

Measure = 
DIVIDE(
  COUNT(data[Respondent]),
  CALCULATE(
    DISTINCTCOUNT(data[Respondent]),
    ALL(data[category])
  )
)

HTH,

Frank

Hi Frank,

 

Thanks for your suggestion but that actually just makes it worse.

What I have look like the following (anonymized):Capture.PNG

And adding the column within ALL gives me:

Capture.PNG

@carinat

 

In DAX, there's no function which is the opposite of ALLEXCEPT(). You have to use All(Column1, Column2,...) to include all other column as filter context expect that column you want to ingore. For more details, please see: ALL Function (DAX).

 

Regards,

can you please post a screenshot of your data table?

 

Frank

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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