Forum Discussion

hirdesh19's avatar
hirdesh19
Frequent Visitor
9 years ago

date filter on multiple custom metrics

I have multiple metrics based on different dates like Created date, resolved date, updated date, each matrix give a number of tickets, I want to apply a general date filter, so that I can get a number of tickets created, resolved and updated within the filter range.

 

Please help me if anyone has any idea how to achieve this.

 

Thanks  

Hirdesh 

2 Replies

  • Eric_Zhang's avatar
    Eric_Zhang
    Microsoft Employee

    hirdesh19

    With limited information I can get from your description, to use a general date slicer, you may try to unpivot the dates columns and change the measures accordingly.

     

     

    For further suggestion, please post some same data and expected output.

  • Hey,

     

    here is DAX/Model based solution.

     

    I use a calendar table that is not related to your fact table,

     

    I then create this Measure

    In Date Range = 
    var daterange = ALLSELECTED('Calendar Unrelated'[Date])
    return
    CALCULATE(
    	SUMX('Table1',
    		IF(
    			OR(
    				OR('Table1'[Date1] IN (daterange),'Table1'[Date2] IN (daterange))
    				,'Table1'[Date3] IN (daterange)
    			)
    			, 1,0
    		)
    	)
    )

    This measure than can be used in any visual

     

    Here is an example how this may look like, be aware that the table is not using the measure as a filter whereas the bar chart does. For this reason the table shows both records and the bar chart just record 1

     

     

    Hope this helps

    Cheers