Complex calculation DAX - need ideas

Vander1981

New Member
Joined
Jun 20, 2017
Messages
18
Hi guys,

Here is my problem :

I would like to create a measure for incentive calculation. Below my table :

I have got a table with following columns : Date; Sales Reps; Products; Actuals Revenue ; Budget Revenue ; Weight
This table have relationships with Dimension Date table and Dimension Sales Reps.

The idea is that each of the 3 products per sales reps has a different weight, let's say 30%, 20% and 50%
That weight has to be multiplied by the ratio (Actuals Revenue / Budget Revenue).
If you sum up the result for the 3 products you obtain a total % of achievement.
When the time period is only one month, this can be done with a SUMX over that table.

However, when YTD calculation has to be performed I am completely lost. Why ? Because then the SUMX does not work anymore.
Indeed, it iterates over each rows, as there are multiple months, ratio per products are summed over month...which is not good.

With a basic sum, I don't know how to allocate the weight per products.
I tried something with function table removing the date column but then I lose my connection with the Date table. I am completely stuck here.

Would you know a workaround that could help me ?

The final output should only be a percentage number per sales reps.

Thanks a lot !!
 
Last edited:

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
I was finally able to make it.

[CODEWeighted Ratio =
SUMX (
CALCULATETABLE (
ADDCOLUMNS(
VALUES ( 'Incentive calculation'[Product Group] );

"Sales"; CALCULATE ( SUM ( 'Incentive calculation'[NetSales Revenue] ) );

"Budget"; CALCULATE ( SUM ( 'Incentive calculation'[NetSales Budget] ) );

"Weight"; CALCULATE ( MIN ( 'Incentive calculation'[Weight]) )

);

'Incentivecalculation'[Parameter] = "Focus Product"

);

[Revenue] / [Budget]
* [Weight]
)
][/CODE]
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,631
Latest member
a_potato

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top