Forum Discussion

jeck12's avatar
jeck12
Frequent Visitor
2 years ago
Solved

Tiered Measure for Rebate Calculation

I'm developing a report that pulls together revenue data and then calculates the rebate amount, based on specific parameters, which is different for each individual customer. There are simple calcula...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi jeck12 

     

    My assumption is that the stratification is based on the value of Revenue.

     

    Here is a simple program I offer that you can reference.

     

    The point is that after determining the Rebate Methodology, a hierarchical calculation is performed based on Revenue.

     

    Create a measure.

     

     

    Measure = 
    VAR _RebateMethodology = SELECTEDVALUE('Table'[Rebate Methodology])
    VAR _Revenue = SELECTEDVALUE('Table'[Revenue])
    RETURN
    SWITCH(
        _RebateMethodology,
        "S", _Revenue * 0.5,
        "T", 
        IF(
            _Revenue < 4000000,
            _Revenue * 0.1,
            IF(
                _Revenue >= 4000000 && _Revenue < 40000000,
                _Revenue * 0.2,
                _Revenue * 0.3        
            )
        )
    )

     

     

    Here is the result.

     

     

    Regards,

    Nono Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.