cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
CMAC_Terry Regular Visitor
Regular Visitor

Calculate Customer Rebate based on Tiered Cumulative SalesFYTD

Hoping someone out there can help me. I want to calculate a customer rebate based on the cumulative sales multiplied by a  % when sales reach certain levels, eg:

 

FYTD Sales > 400K , FYTD Sales * 0 ,

FYTD Sales > 400K && FYTD Sales < 500K , FYTD Sales * 0.02

(Above only on the sales between 400K && 500K =  100K * 0.02 = 2K)

FYTD Sales >500K, FYTD Sales * 0.045 (Only on the sales above 500k)

 

 

I'm trying create the measure: tried if and switch statements, on cumulatve sales and Sales DatesYTD, but can't get it to work.

 

Problems I'm having are either I calculate the right figures but it won't display properly over months (to show montly calculation ), or the measure shows correctly over months but calculates incorrect figures ( on the whole sales including the first 400).

 

Anyone any ideas or done something similar, appreciate all the help I can get,.

 

Thanks 

1 ACCEPTED SOLUTION

Accepted Solutions
Stachu Super Contributor
Super Contributor

Re: Calculate Customer Rebate based on Tiered Cumulative SalesFYTD

try this, I've put the input values as variables so it's easier to adjust in the future

Rebate =
VAR AmountSold = [FYTD Sales]
VAR UpperValue = 500000
VAR UpperRebate = 0.045
VAR LowerValue = 400000
VAR LowerRebate = 0.02
RETURN
    IF (
        AmountSold > UpperValue,
        ( AmountSold - UpperValue )
            * UpperRebate
            + ( UpperValue - LowerValue )
            * LowerRebate,
        IF ( AmountSold > LowerValue, ( AmountSold - LowerValue ) * LowerRebate, 0 )
    )
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

View solution in original post

3 REPLIES 3
Stachu Super Contributor
Super Contributor

Re: Calculate Customer Rebate based on Tiered Cumulative SalesFYTD

try this, I've put the input values as variables so it's easier to adjust in the future

Rebate =
VAR AmountSold = [FYTD Sales]
VAR UpperValue = 500000
VAR UpperRebate = 0.045
VAR LowerValue = 400000
VAR LowerRebate = 0.02
RETURN
    IF (
        AmountSold > UpperValue,
        ( AmountSold - UpperValue )
            * UpperRebate
            + ( UpperValue - LowerValue )
            * LowerRebate,
        IF ( AmountSold > LowerValue, ( AmountSold - LowerValue ) * LowerRebate, 0 )
    )
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

View solution in original post

Microsoft v-huizhn-msft
Microsoft

Re: Calculate Customer Rebate based on Tiered Cumulative SalesFYTD

Hi @CMAC_Terry,

Please follow the solution @Stachu posted. Please mark the reply as answer if you have resolved your issue. Please share your sample table to test if you still have problems.

Thanks,
Angelia

CMAC_Terry Regular Visitor
Regular Visitor

Re: Calculate Customer Rebate based on Tiered Cumulative SalesFYTD

Thanks for your help

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)