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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
giuliapiazza94
Helper IV
Helper IV

divide cost TOTAL

Hi guys,

I have a similiar case to divide cost of each customer

giuliapiazza94_4-1636974996290.png

But, if I select a customer (for example Tony) I want to see 420, not 110, because I need to divide total cost for Tonygiuliapiazza94_3-1636974955724.png

for example:

30% of 420 --> item A

70% of 420 --> item B

I tried to use ALL ( ) but if I expand matrix until to item the costs don't change

Can you help me?

 

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@giuliapiazza94 ,

 

You need a measure like

calculate(sum(Table[Cost.Cost]), allselected())

 

In case you need switch between sub total  and grand total refer

https://xxlbi.com/blog/new-dax-function-isinscope/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @giuliapiazza94 ,

 

Does the replies above solve your problem? If it has been solved, please mark the correct reply as the standard answer to help the other members find it more quickly.Thanks in advance for your kind cooperation!

 

Hope it helps,


Community Support Team _ Caitlyn

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

amitchandak
Super User
Super User

@giuliapiazza94 ,

 

You need a measure like

calculate(sum(Table[Cost.Cost]), allselected())

 

In case you need switch between sub total  and grand total refer

https://xxlbi.com/blog/new-dax-function-isinscope/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.