Forum Discussion

dchakarova's avatar
dchakarova
New Member
3 years ago
Solved

Multiple filters, if and count

Hi I`m pretty new to Power I and i have a prolem that i can`t solve. I have different customer names and when they got a discount, i want to show that John is repeated 5, times for example, and 3 tim...
  • PaulDBrown's avatar
    PaulDBrown
    3 years ago

    This measure should work:

    Customers with ore than 2 discounts =
    VAR _DC =
        CALCULATE (
            COUNTROWS ( fTable ),
            FILTER ( ALLEXCEPT ( fTable, fTable[Customer] ), fTable[Discount] = "Yes" )
        )
    RETURN
        IF ( _DC >= 2, _DC )