Forum Discussion
DAX Filter Data based on Certain Date Range
- Anonymous3 years ago
Hi Anonymous ,
I suggest you to set the two relationships between Calendar table and QCDailyTarget table to inactive.
Or your visual will be impacted by the relationship.
I suggest you to create a measure to filter your visual.
FilterMeasure = VAR _RANGESTART = MIN ( 'Calendar'[Date] ) VAR _RANGEEND = MAX ( 'Calendar'[Date] ) RETURN IF ( SELECTEDVALUE ( QCDailyTarget[Start Date] ) <= _RANGESTART && SELECTEDVALUE ( QCDailyTarget[End Date] ) >= _RANGEEND, 1, 0 )Add this measure into visual level filter and set it to show items when value = 1.
Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Hi Mahesh0016 , this produces same output as what i have tried and doesnt filter it out based on the dates . May i ask if you put the relationship only on end date to the calendar? Also , sorry for the bad explaination at the question but what i want is all the data shown based on date filter .