Forum Discussion
Calculate Sales Incentive by Client
- Anonymous3 years ago
Hi ADSL ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want.
1. Besides the excel file, assume that you have the below two tables(include target and contribution info)
2. Create some measures as below:
Sales = SUM('Data'[Amount No VAT])% Actual vs Target = VAR _selsupplier = SELECTEDVALUE ( 'Target'[Supplier Name] ) VAR _target = CALCULATE ( SUM ( 'Target'[Target] ), 'Target'[Supplier Name] = _selsupplier ) RETURN DIVIDE ( [Sales], _target )Points Scored = SUM ( 'Target'[Weight] ) * [% Actual vs Target]Payout (USD) = VAR _selsuplier = SELECTEDVALUE ( 'Target'[Supplier Name] ) VAR _usd = SWITCH ( TRUE (), [% Actual vs Target] >= 0.9 && [% Actual vs Target] < 0.9499, 45, [% Actual vs Target] >= 0.95 && [% Actual vs Target] < 0.9999, 75, [% Actual vs Target] >= 1, 90 ) VAR _contribution = CALCULATE ( MAX ( 'Contribution'[Contribution%] ), 'Contribution'[Supplier Name] = _selsuplier ) RETURN _usd * _contributionIf the above one can't help you get the desired result, please provide more details(special examples, correct result etc.) on your requirement. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hi ADSL ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want.
1. Besides the excel file, assume that you have the below two tables(include target and contribution info)
2. Create some measures as below:
Sales = SUM('Data'[Amount No VAT])% Actual vs Target =
VAR _selsupplier =
SELECTEDVALUE ( 'Target'[Supplier Name] )
VAR _target =
CALCULATE ( SUM ( 'Target'[Target] ), 'Target'[Supplier Name] = _selsupplier )
RETURN
DIVIDE ( [Sales], _target )Points Scored = SUM ( 'Target'[Weight] ) * [% Actual vs Target]Payout (USD) =
VAR _selsuplier =
SELECTEDVALUE ( 'Target'[Supplier Name] )
VAR _usd =
SWITCH (
TRUE (),
[% Actual vs Target] >= 0.9
&& [% Actual vs Target] < 0.9499, 45,
[% Actual vs Target] >= 0.95
&& [% Actual vs Target] < 0.9999, 75,
[% Actual vs Target] >= 1, 90
)
VAR _contribution =
CALCULATE (
MAX ( 'Contribution'[Contribution%] ),
'Contribution'[Supplier Name] = _selsuplier
)
RETURN
_usd * _contribution
If the above one can't help you get the desired result, please provide more details(special examples, correct result etc.) on your requirement. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards