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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors