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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Denominator that removes certain context filters but keeps all visual, page and report filters

Hello,
 
I would like to create a denominator for a drill-down table that drills down on a product's Brand, SubBrand, and then Item. I would need a denominator that can ignore the context filter when drilling down to the Item, but retaining the context filter from the Brand. 
 
Then, I would also like the visual, page and report filters to still work on the Brand, the SubBrand and the Item for both the numerator and the denominator. This functionality is currently being overwritten in my DAX using the ALL() function. Is there any alternative I could try that would allow me to continue to remove context filters from the Item in my drilldown but still keep the Item filters done by the user in the visual, page and report filters?
 
Current DAX example:
CALCULATE(
[Sales], 
filter(
ALL(
'Product'[Brand],
'Product'[Sub Brand],
'Product'[Product Name],
)))
1 ACCEPTED SOLUTION
d_gosbell
Super User
Super User

I think the following approach should do what you want. It will give the same value for every row, but still reflects any filters the user applies

CALCULATE(
[Sales], 
ALLSELECTED('Product'[Brand]),
ALLSELECTED('Product'[Sub Brand]),
ALLSELECTED('Product'[Product Name])
)

View solution in original post

1 REPLY 1
d_gosbell
Super User
Super User

I think the following approach should do what you want. It will give the same value for every row, but still reflects any filters the user applies

CALCULATE(
[Sales], 
ALLSELECTED('Product'[Brand]),
ALLSELECTED('Product'[Sub Brand]),
ALLSELECTED('Product'[Product Name])
)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.