I have a table with columns "date_start" and "date_end". In the report I want a datepicker that filters the rows where the picked date is between these two columns.
But I have no idea how to do it, and I can't find anything on the internet...
Do you have any idea?
CodePudding user response:
Create a measure and put it to visualization. Here example (2 disconnected table)
PickThis = var __selectedDate = SELECTEDVALUE('Calendars'[Date])
return CALCULATE(COUNTROWS('Employ'), ALL('Employ'[From],'Employ'[To]), 'Employ'[From] <= __selectedDate && ('Employ'[To] >= __selectedDate || ISBLANK('Employ'[To]) ))
dummy data:
Output:


