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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
areimer
New Member

Filtering by measure causes measure to recalculate - want it to remain static

My calculated field Volume Share is based off of the total Category ( i.e. brand 1 volume sales / category volume sales = 50%).

 

 Volume Sales Volume Share
Category100 
brand 15050%
brand 23030%
brand 42020%
brand 51010%

 

When I apply a filter to look at only brands with a Volume Share >20%, Volume Share recalculates with the remaining values. I want it to remain static, showing the 50% and 30% values from above.

 Volume Sales Volume Share
Category60 
brand 15083%
brand 51017%

 

Here's my formula...

 

Volume Share =
VAR Share_of_Category =
CALCULATE (
SUM ( non_vmi_fact_data_final_history[volume_sales] ), non_vmi_time_meta_data_final_history[Time Period] = "Latest 4 Weeks",
( ALLSELECTED ( non_vmi_product_meta_data_final_history[custom_brand_value] ) )
)
VAR Volume_Sales = CALCULATE(
    SUM(non_vmi_fact_data_final_history[volume_sales]),
    non_vmi_time_meta_data_final_history[Time Period] = "Latest 4 Weeks"
)
RETURN
ROUNDDOWN ( DIVIDE ( Volume_Sales, Share_of_Category ), 3 )

 

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@areimer Perhaps try ALL instead of ALLSELECTED?



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...

No luck with ALL, numbers end up different than when using ALLSELETED, but there's still some calc going on. Thanks for the idea though. 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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