Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Date filter across multiple different date fields

Hi,

 

I have data in a table like below: 

 

Unique IDStatus 1 Start DateStatus 1 End DateStatus 2 End DateStatus 3 End DateStatus 1 TimeStatus 2 TimeStatus 3 Time
AA4/29/20204/30/20205/1/20205/3/20201.001.002.00
AB4/23/20204/25/20204/28/20204/30/20202.003.002.00
AC4/19/20204/20/20204/22/20204/24/20201.002.002.00
AD4/19/20204/29/20205/1/20205/3/202010.002.002.00
AE4/23/20204/25/20204/28/20204/29/20202.003.001.00
AF4/19/20204/20/20204/21/20204/24/20201.001.00

3.00

 

I want to be able to summarize how many Unique IDs were completed in a specific time period for all 3 statuses, and also find on average how long it took in that time period. 

 

So I am trying to create a date slicer that can calculate it for all statuses at the same time.

 

So for example, if I had a date slicer set to 4/28/2020 to 5/1/2020:

Count_1 = 2

Count_2 = 4

Count_3 = 2

 

Avg_Time_1 = 5.5

Avg_Time_2 = 2.25

Avg_Time_3 = 1.5

 

Is something like this possible?

 

Thanks,

Andrew

  • Hi Anonymous ,

     

    Create an unrelated calendar table as slicer then create measure like this:

    Count_1 = CALCULATE(COUNT('Table'[Unique ID]),FILTER('Table','Table'[Status 1 End Date] in VALUES('Table 2'[Date])&&'Table'[Status 1 Start Date]<=MAX('Table 2'[Date])))

    Sample .pbix 

     

    Best Regards,
    Liang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies