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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
lawada4
Frequent Visitor

table visual summing total wrong

im trying to calculate commission by each agent according to pack he sold and number of transations by pack, the problem is im when im multiplying the pack commission by number of transactions it's doing the same multiplication forthe overall total transactions and the overall commssion tota which which is resulting in wrong total commission for the agent. in the screenshot  the total commission should be 124.305 instead of 3908.21

lawada4_0-1673518169720.png

 

the measure im using:

CALCULATE(COUNT('categories trans'[revenue]) * SUM('categories commision'[Commission]),
    GROUPBY (
        'categories trans',
        'categories trans'[AGENT_NAME],
        'categories trans'[Categoty],
        'categories trans'[Commitment],
        'categories trans'[BASE_TYPE],
        'categories trans'[revenue]
       
       
    ))

 

note: the data model consists of two table : trancations table by agents and commission pack by category

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@lawada4 , try a measure like

 

Sumx(
Summarize(
'categories trans',
'categories trans'[AGENT_NAME],
'categories trans'[Categoty],
'categories trans'[Commitment],
'categories trans'[BASE_TYPE],
'categories trans'[revenue],
"_1", COUNT('categories trans'[revenue]) * SUM('categories commision'[Commission]) )

,[_1]
)
))

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
amitchandak
Super User
Super User

@lawada4 , try a measure like

 

Sumx(
Summarize(
'categories trans',
'categories trans'[AGENT_NAME],
'categories trans'[Categoty],
'categories trans'[Commitment],
'categories trans'[BASE_TYPE],
'categories trans'[revenue],
"_1", COUNT('categories trans'[revenue]) * SUM('categories commision'[Commission]) )

,[_1]
)
))

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

the measure solved the issue . thanks!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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