Forum Discussion

DK-C-87's avatar
DK-C-87
Icon for Helper I rankHelper I
1 year ago
Solved

Count only once per ID group

Have can I get this measure to only count Plant once ? Highlighted butikker = COUNTX(HighlightGBS, IF([Highlight Valgte Muligheder] > 0, 1))-0 Currently it gives me 14, but it should give me 13 b...
  • rajendraongole1's avatar
    1 year ago

    Hi DK-C-87  you can modify the measure:

     

    Highlighted butikker =
    CALCULATE(
    COUNTROWS(
    DISTINCT(HighlightGBS[Plant])
    ),
    FILTER(HighlightGBS, [Highlight Valgte Muligheder] > 0)
    )

     

    I hope by using DISTINCT, the count for Plant 1483 will only appear once, giving you the correct result of 13 instead of 14.

     

    Please check.