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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
TRK
Helper II
Helper II

How can I keep page filters acitive - using a measure that calculates a grand total?

Hi,

 

I currently have a page filter that filters out one country in the Country of Origin column.

 

I need to calculate a % of the a total number of samples that come from any one country, or program, etc., selected on the dasboard visualizations against the total unfiltered samples (excluding the one country I filtered out using the page filter) .

 

I want the the total unfiltered samples is the same amount no matter which filters are applied on the dashboard (such as program) - excluding the page filter for the one country.

 

I have been experimenting with CALCULATE AND ALL functions - but it is not working - I realize the last "ALL" for country lookup would be discounting all filters on country - not sure what function I could use to keep the page filter active or a method that would do the equivelant.

 

unfiltered samples = CALCULATE('sample data'[sum samples],

                                   ALL ('Program Lookup'[Program]) ,

                                   ALL ('Country Lookup'[Country of Origin]))

 

 

My goal :  % of samples = [sum samples]/[unfiltered samples]

 

any suggestions are appreciated.

 

-TRK

1 ACCEPTED SOLUTION

Unfortunately "ALLEXCEPT" ends up filtering out all countries in the total counts.  I want to keep all the countries in the "country of origin" column, except the one country I filtered out on the page filter (this allows me to filterout domestic vs. imported samples).

 

Any other ideas?

View solution in original post

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

I believe you want to use ALLEXCEPT.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Unfortunately "ALLEXCEPT" ends up filtering out all countries in the total counts.  I want to keep all the countries in the "country of origin" column, except the one country I filtered out on the page filter (this allows me to filterout domestic vs. imported samples).

 

Any other ideas?

Hi,

 

I realized I had a relationship line missing.  I went back and tried ALLEXCEPT again.  It worked.

 

Thank-you!

Anonymous
Not applicable

Hi @TRK,

 

>>Any other ideas?

I'd like to suggest you use "ALLSELECTED" to instead the "ALL" function.

 

Regards,

Xiaoxin Sheng

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.