Forum Discussion
Anonymous
1 year agoNot applicable
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...
- Anonymous1 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
danextian
1 year agoSuper User
Hi Anonymous
I answered a similar post a few days ago. In the attached file, you will see a measure that uses a disconnected table and one that has a relationship to start date.
- Anonymous1 year agoNot applicable
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