Forum Discussion

NPC's avatar
NPC
Helper I
2 years ago
Solved

Count Based on Two Colums

Hello,   Help please! I have a table that looks like this   CustomerID Event ID Count of Events 12445 1001   12445 1002   12445 1003   12445 1003     I need to fill ...
  • Prateek97's avatar
    2 years ago

    Hi NPC ,

     

    You can simply do Disttinctcount here instead of COUNTROWS.

     

    OutageCount =
    CALCULATE(
        DISTINCTCOUNT(Outages[EventID]),
        FILTER(Outages, Outages[CustomerID] = EARLIER(Outages[CustomerID]))
    )

     

    Please mark as solution, if it works.