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
lawadaa
Helper I
Helper I

measure is returing wrong total value in table visual

hi everyone

 

i have created a measure that calculates the sales agents incentive. it's returning value per row correct but the total value in the table visual is wrong

lawadaa_0-1683543492326.png

 the measure is :

new agent incentive = CALCULATE([new commissin sum]*max('Agent Rate Key'[Agent Rate]))
 
new commission sum measure :
new commissin sum = Sumx(Summarize('categories trans','categories trans'[categories summarize],'categories trans'[base type without zeed], "_1", [new commission calculation]), [_1])
 
new commission calculation measure :
new commission calculation = IF([new achiev %]<= 0.8999,0, IF(([new achiev %]>=.90 &&[new achiev %]<=.9499),300-(.1*300), IF([new achiev %]>=.95 &&[new achiev %]<=.9999,300-(.05*300), IF([new achiev %]>=1 &&[new achiev %]<=1.09,300, IF([new achiev %]>= 1.1 &&[new achiev %]<=1.1999,300+(.1*300), IF([new achiev %]>=1.2 &&[new achiev %]<=1.29999,300+(.2*300),IF([new achiev %]>=1.3,300+(.3*300),0)))))))
5 REPLIES 5
tamerj1
Super User
Super User

Hi @lawadaa 
Please try

new agent incentive =
SUMX (
    SUMMARIZE (
        'Agent Rate Key',
        'Agent Rate Key'[T_NAME],
        'Agent Rate Key'[categories summarize],
        'Agent Rate Key'[base type without zeed]
    ),
    [new commissin sum] * CALCULATE ( MAX ( 'Agent Rate Key'[Agent Rate] ) )
)

it's still returing the same total198. correct total should be 112.5

lawadaa_0-1683548966410.png

 

@lawadaa 
Would you please paste a screenshot of the code that you have used?

lawadaa_0-1683550125851.png

 

@lawadaa 

Please try

new agent incentive =
SUMX (
SUMMARIZE (
'Agent Rate Key',
'Agent Rate Key'[T_NAME],
'Agent Rate Key'[categories summarize],
'Agent Rate Key'[base type without zeed],
'Agent Rate Key'[Agent Rate]
),
[new commissin calculation] * 'Agent Rate Key'[Agent Rate]
)

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.