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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Jensk
Frequent Visitor

Static calculation independent on hierarchical slicing

I need to slice by a hierarchy of entities that consists of companies that each have their customers. I can look at numbers for the Entity or for a Company within the Entity:

entity_selected_revenue.png

My Measures:

Revenue = SUMX( Sales, Sales[Amount] * Sales[Price] )
Revenue Entity = CALCULATE( [Revenue], ALLSELECTED(), VALUES(Sales[Entity]))

 

Now when I select a company, I would want my 'Revenue Entity' to remain unchanged but it is not:

comp_selected_revenue.png

What is wrong with my 'Revenue Entity' measure? I would think the ALLSELECTED() removed the filter context and calculate by Entity. I need it to calculate the revenue for all companies that have the same entity as the selected company. In my data customer3 and customer4 only have revenue in company2.

3 REPLIES 3
melanid
Frequent Visitor

Hi, 

 

Good ! I may have an other idea, you need to specify the column for the function ALLSELECTED(). Maybe if you try ALLSELECTED(Company) or ALL(COMPANY) ?

 

Best regards,

melanid
Frequent Visitor

Hi,

 

Did you try the REMOVEFILTERS() function? 

 

Maybe something like REMOVEFILTERS(Customer) will work (instead of ALLSELECTED). 

 

Best regards,

Jensk
Frequent Visitor

Thanks for the suggestion.
Using REMOVEFILTERS(Sales[Customer]) instead of ALLSELECTED() yields the same result.
Using REMOVEFILTERS(Sales[Company]) instead of ALLSELECTED() yields the same result for rows, but the total is correct.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors