Forum Discussion

ncondon22's avatar
ncondon22
New Member
5 years ago

Creating Measures for distinct count between 2 custom dates

I have a dataset of leads with unique IDs and lead dates for the past 2 years.  However, the years are not based on the calendar year, but a custom time frame 8/1 - 7/31.  I also created a date table.

 

I would like to create measures that do the following -

 

Prior Year leads - distinct count of IDs for lead date between 8/1/19 - 7/31/2020

Current Year leads - distinct count of IDs for lead date between 8/1/20 - 7/31/2021

Prior Year Leads to date - count of prior year leads up to current date

 

I was able to do this with the data separated into 2 queries using DAX below, but was unsure how to accomplish it with mixed data set.

Total CY Leads = COUNTA(CY_Leads[CONTACTID])
Total PY Leads = COUNTA(PY_Leads[CONTACTID])
 
Thank you

2 Replies