Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Filtering on multiple Dates at the same time

Hi,   I have a problem and though of different solutions but none of them worked.   I have this kind of table structure:   Ticket Data Creation Date    Customer ID    ... 1.1.2021 14:3...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous 

    Try to build an unrelated date table and build measures to filter your visual by slicer.

    Date Table:

    Date = ADDCOLUMNS(CALENDARAUTO(),"Year",YEAR([Date]),"Month",MONTH([Date]),"MonthName",FORMAT([Date],"MMMM"))

    Relationship:

    Measures:

    Filter Measure1 = 
    IF(MAX('Call Data'[Creation Date])>=MIN('Date'[Date])&&MAX('Call Data'[Creation Date])<=MAX('Date'[Date]),1,0)
    Filter Measure2 = 
    IF(MAX('Ticket Data'[Creation Date])>=MIN('Date'[Date])&&MAX('Ticket Data'[Creation Date])<=MAX('Date'[Date]),1,0)

    Measure1 is for call data table and measure2 is for ticket data table. Build visuals , add measures into filter field in visual and set it to show items when value =1.

    Select Year =2021 and Month = 1 and Customer ID =1. Result is as below. 

    Best Regards,
    Rico Zhou

     

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