Forum Discussion

Dennis_Pedersen's avatar
2 years ago
Solved

Find value in another table

Hi    I have a measure which have calculated the total discount on a customer(cust_disc).   Given this discount I would like to find from the table below(discounttable) what the turnover should h...
  • bhanu_gautam's avatar
    2 years ago

    Dennis_Pedersen , Try using below DAX

     

    Minimum Turnover =
    VAR Discount = [cust_disc] // Replace [cust_disc] with your actual measure for calculating the total discount on a customer

    RETURN
    CALCULATE(
    SUM(discounttable[Turnover]),
    discounttable[Discount] >= Discount,
    FILTER(
    ALL(discounttable),
    discounttable[Discount] >= Discount
    )
    )