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
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
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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