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! Request now

Reply
Anonymous
Not applicable

Measure that takes in only specified filter context

Hi,

 

I need some help in creating a measure that would always show the total_weights based on the two active filters selected, i.e., mpId and riskProfile. See snapshot below for context. Currently, my total_weights measure is showing the right number (i.e., 70% based on my snapshot below) when both active filters are applied. However, the measure value is refreshed when I select a row in the table visual (e.g., The measure is updated as 10% if I select acId = 10921081 from the table visual). Is there a way to create a measure that takes in only the 2 active filters (mpId and riskProfile) and ignores the rest? 

Screenshot 2025-04-23 140959.png

total_weights =
CALCULATE
(
    SUM(mp_mix[percent]),
    ALLSELECTED(mp_mix)
)
1 ACCEPTED SOLUTION

@Anonymous 

First of all Percentage is a Non aditive measure. It cannot be summed up. It should be calculated inside in a measure itself.

Now, the eaisest option is which @sjoerdvn  mentioned.--> Turned off the Edit interaction.

In dax, You need to igonore the filters from acid column .
Below code can work for you.

total weight = 
CALCULATE(
    SUM( 'Table'[Percent] ),
ALLEXCEPT('Table','Table'[Cateory],'Table'[RiskProfile])
)

 

Below screenshot

sanalytics_0-1745398577981.png

Attaching the pbix file for your reference.

 

Hope it helps

 

Regards

sanalytics

 

View solution in original post

4 REPLIES 4
sjoerdvn
Super User
Super User

I would not change the measure, but edit the interactions on the report page.

@Anonymous 

First of all Percentage is a Non aditive measure. It cannot be summed up. It should be calculated inside in a measure itself.

Now, the eaisest option is which @sjoerdvn  mentioned.--> Turned off the Edit interaction.

In dax, You need to igonore the filters from acid column .
Below code can work for you.

total weight = 
CALCULATE(
    SUM( 'Table'[Percent] ),
ALLEXCEPT('Table','Table'[Cateory],'Table'[RiskProfile])
)

 

Below screenshot

sanalytics_0-1745398577981.png

Attaching the pbix file for your reference.

 

Hope it helps

 

Regards

sanalytics

 

Anonymous
Not applicable

Thanks, the suggested DAX expression works for me. Toggling with the interactions wouldn't work in this case since I need that measure for other downstream calculations. 

bhanu_gautam
Super User
Super User

@Anonymous  ,If you want to remove all filters except for mpId and riskProfile, you can use the ALL function combined with KEEPFILTERS to keep only the desired filters:

DAX
total_weights =
CALCULATE(
SUM(mp_mix[percent]),
ALL(mp_mix),
KEEPFILTERS(mp_mix[mpId]),
KEEPFILTERS(mp_mix[riskProfile])
)

 




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






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.