Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
hirdesh19
Frequent Visitor

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 2
TomMartens
Super User
Super User

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

2017-08-04_9-15-39.png

 

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

 

2017-08-04_9-18-43.png

 

Hope this helps

Cheers



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Eric_Zhang
Employee
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.

 

Capture.PNG

 

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

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.