Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Measure for a DistinctCount by Categories

Hi Power BI Users,    I have a table similar to below and trying to create a new measure by using DAX to get the distinct count of prodid&customers. In short, we are trying to calculate how many or...
  • Anonymous's avatar
    Anonymous
    7 years ago

    Vvelarde, this has been resolved by added in "KEEPFILTERS".

     

    DC Prod by Customers =
    CALCULATE (
        DISTINCTCOUNT ( Table1[Order ] ),
        KEEPFILTERS(ALLEXCEPT ( Table1, Table1[ProductID ], Table1[Customers] ))
    )

     

    THANK YOU!