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

View all the Fabric Data Days sessions on demand. View schedule

Reply
apvu2
Helper I
Helper I

Divide when slicer is slected

So I have two data sets one is my master table, table X, which contains a client name and a daily revenue.  then have another table, table Y that contains salesmen who worked on this client. I have a reationship netween the two tables linled by Client. I am then using splicers to splice the Sum of revenue to see which salesmen generated what revenue, etc. What I am trying to do is when lets say salesmen "Abe" is selcted I want the total revenue to be split between him and whoever esle worked on that client. I tried doing a distinct count and dividing that way, but it only works correctly when a salemen is selected and when none are the total revenue is incorect as it divides by the entire count of distinct rows. example tab;e are shown below. So if I splice it my the sales person Johnson it shoud show on my Matrix table it should show the Clinet target as that is essentailly the only Client he worked on, and the Revenue should show $100/3 = $33.33 since there wwre 3 individuals working on target so the revenue is split. 

ClientDaily revenue
Target100
Big Lots150
Big 5200

 

 

ClientSales Person
TargetJon
TargetMike
TargetJohnson
Big 5Mike
Big LotsJohnson
Big LotsMike

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@apvu2 , Try like

 

Divide(sum(Table1[Daily revenue]), calculate(sum(Table1[Daily revenue]), all(table2[sales person]) ) )

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

3 REPLIES 3
ALLUREAN
Solution Sage
Solution Sage

Hi, @apvu2 

 

Is this is what you want to achieve?

 

https://www.dropbox.com/s/73cxgiln214lu6t/Divide%20when%20slicer%20is%20slected%28allure-analytics.c...

Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.

Appreciate your Kudos !!!

https://allure-analytics.com/




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


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




amitchandak
Super User
Super User

@apvu2 , Try like

 

Divide(sum(Table1[Daily revenue]), calculate(sum(Table1[Daily revenue]), all(table2[sales person]) ) )

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

It works, for the totals, but it does not update the numbers for the total revenue inside the matrix for the clients.

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.

Top Solution Authors
Top Kudoed Authors