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
FelixElliott
Frequent Visitor

Dax formula to prevent a measure from being filtered by a slicer

Hi Everyone I am feeling very stupid because I can't figure out the solution ( think my brain is in Dax overload)

 

I have a measure to calculate the total tourist visitors to regional Victoria (I am in Australia)

 

Regional Vic Visitors =
CALCULATE([Total Visitors],
'Region_Dim_Key'[State] = "Victoria",
'Region_Dim_Key'[Region_Key] <> 2017,
'Region_Dim_Key'[Region_Key] <> 2039,
'Region_Dim_Key'[Region_Key] <> 2037
)
 
The Filters are to exclude specific destinations from the calculation. This measure works fine.
 
I need to track the regional total visitors over time and compare the visitors to sub-regions in a line graph to using a slicer for the sub-regions ie. y - axis total regional visitors and secondary y - axis the sub-region visitor number.
 
When I apply the slicer the regional visitor is filtered and I can't figure out how to modify the Dax code to only apply the slicer filter to the sub-region number and not the regional number. 
 
Thanks in advance
 
 
 
3 REPLIES 3
Samarth_18
Community Champion
Community Champion

Hi @FelixElliott ,

 

Based on the description below code can help you:-

Subregion Visitors = 
CALCULATE(
    [Total Visitors],
    'Region_Dim_Key'[State] = "Victoria",
    'Region_Dim_Key'[Region_Key] = SELECTEDVALUE('Region_Dim_Key'[Region_Key]),
    'Region_Dim_Key'[Region_Key] <> 2017,
    'Region_Dim_Key'[Region_Key] <> 2039,
    'Region_Dim_Key'[Region_Key] <> 2037
)

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

some_bih
Super User
Super User

Hi @FelixElliott  check link with example using DAX function ALLEXCEPT. In your example there is no information enought to provide possible solution, like model and relationships.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Anonymous
Not applicable

Hi @FelixElliott ,

I don't know exactly what you need, can you present it in the form of excel or result chart?Thank you.

Best Regards,

Xianda Tang

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.