Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Countrows with multiple criteria

Hello everyone, Thank you for your time, I'm struggling creating a measure, hopefully you guys can help me. Basically it's a countifs in excel but I just can make it work in DAX. Here's an exampl...
  • DavisBI's avatar
    5 years ago

    Hi, Anonymous ,

     

    In this case you need to use EARILER().  (see screenshot below)

     

     

    Column = 
    CALCULATE (
        COUNT ( Sheet1[Date] ),
        'Sheet1'[Customer ID] = EARLIER ( Sheet1[Customer ID] ),
        'Sheet1'[Date] = EARLIER ( Sheet1[Date] ),
        ALL ( Sheet1 )
    )

    Mark this post as solution if this helps,thanks!