Forum Discussion

Siddhesh_Pal's avatar
Siddhesh_Pal
Advocate II
2 years ago
Solved

Need help in the pricing calculation.

I have a Pricing table and Customer GMV from another table, based on Customer GMV, we have to take the reference row and calculate in that row to get the final amount.   Pricing Table   Ref. ...
  • Anonymous's avatar
    Anonymous
    2 years ago

    I made a sample dataset using the table you provided, I believe the below measure is behaving as you would want it to:

    Raw measure code:

    GMV Calc =
    VAR _GMV = 400000 /*Replace with your actual gmv column/measure*/
    VAR _table = FILTER('Main Data Table', _GMV > 'Main Data Table'[Volume Minimum])
    RETURN
    SUMX(_table, (IF(_GMV > [Volume Maximum], [Volume Maximum], _GMV) - (IF([Volume Minimum] = 0, [Volume Minimum], [Volume Minimum] - 1))) * [BPS])