Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Active Users between Date Ranges, each Month

Hi,   I have a list of Customers with Start and End Dates for a program. Here's some example data:   Customer ID Start Date End Date A 10/09/2024   B 01/06/2024 05/08/2024 C 03...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi danextian,

     

    We're almost there. I made a couple of small amendments to the DAX and it's now working:

    Total Puppies in Training = CALCULATE([Total Dog Codes], 
    CONTAINSSTRING('PROGRAM ENGAGEMENT'[Dog Program Classification], "C2"),
    FILTER(SUMMARIZE('PROGRAM ENGAGEMENT', 'PROGRAM ENGAGEMENT'[Program Start Date], 'PROGRAM ENGAGEMENT'[Program End Date]),
    'PROGRAM ENGAGEMENT'[Program Start Date] <= MAX('02: Calendar'[Dates]) && ( 'PROGRAM ENGAGEMENT'[Program End Date] > MAX( '02: Calendar'[Dates]) || ISBLANK('PROGRAM ENGAGEMENT'[Program End Date]))))

    In my example, I'm looking to count the number of Puppies in our training program, which is the classification filter in this DAX.

     

    Thanks,

    Mark