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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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/

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/

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors