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.
Hi power bi community,
I want to calculate the employees bonus based on what each employee have sold. So I have made a measure to do so. But when I look at the total in my Matrix it doesn't look at the total of the bonus but instead calculate it as if all the employees was a single person and calculate the bonus based on that. Is their any workaround or is this just a quirk of Power BI?
Solved! Go to Solution.
Hi @ThomasWeppler ,
According to your description, I create a sample.
My solution is directly create a calculated column.
Column =
VAR _faktura =
SUMX (
FILTER (
ALL ( 'Invoice' ),
'Invoice'[UserName] = EARLIER ( 'Invoice'[UserName] )
),
Invoice[Faktureret]
)
VAR _basic = 20000
VAR _normal = _basic + ( _faktura - _basic ) * 0.35
RETURN
IF (
_basic > _faktura,
_basic,
IF ( _normal > _faktura * 0.5, _normal, _faktura * 0.5 )
) * 0.5
Get the correct result.
I attach the sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for your responses. Here is a bit more inf o
Unfortunatly I cannot just add the meassure into a calculation becuase the salaey depends of the total number of invoices send out by the employee. I hope it makes more sense now when I have given some additional context.
Hi @ThomasWeppler ,
According to your description, I create a sample.
My solution is directly create a calculated column.
Column =
VAR _faktura =
SUMX (
FILTER (
ALL ( 'Invoice' ),
'Invoice'[UserName] = EARLIER ( 'Invoice'[UserName] )
),
Invoice[Faktureret]
)
VAR _basic = 20000
VAR _normal = _basic + ( _faktura - _basic ) * 0.35
RETURN
IF (
_basic > _faktura,
_basic,
IF ( _normal > _faktura * 0.5, _normal, _faktura * 0.5 )
) * 0.5
Get the correct result.
I attach the sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ThomasWeppler ,
If you mean the measure works fine in each row but incorrect in the total, you should modify the formula of the measure, add SUM or SUMX in the formula. Or a simpler way, create a calculated column.
Column=[Measure]
Then put the column in the visual, it will calculate correctly in the total.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
HI @ThomasWeppler ,
Please add more details to your query.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
106 | |
88 | |
74 | |
69 |
User | Count |
---|---|
123 | |
112 | |
95 | |
83 | |
73 |