Forum Discussion

Kate_McCulloch's avatar
Kate_McCulloch
Regular Visitor
1 year ago
Solved

Count based on disticnt value in another column

Hi Wondering if anyone could help,   I'm trying to do a total cost count for accommodation, but only want to count the value once based on the Family ID (distinct count)   If anyone could help I ...
  • bhanu_gautam's avatar
    1 year ago

    Kate_McCulloch , Try using a measure for this

     

    DAX
    TotalCostByFamilyID =
    SUMX(
    SUMMARIZE(
    YourTableName,
    YourTableName[Family_ID],
    "DistinctCost",
    MAX(YourTableName[Total Cost Accommodation])
    ),
    [DistinctCost]
    )