Forum Discussion
_bs_
Advocate I
1 year agoFilter on start and end dates
I'm looking to create a slicer that filters the visual on Dates. However the visual will show measures relating to created date and end date, so the slicer needs to work for both scenarios but drive...
- 1 year ago
Hi _bs_
You need to duplicate your current date table and keep it disconnected (no relationships).
Add the date from this disconnected table to a slicer
Create another table as follows
DateTypeSelector = DATATABLE("DateType", STRING, {{"CreatedDate"}, {"EndDate"}})Add this to a slicer
Now create a measure that respects the selected date type, edit to fit your tables
SelectedDateType = SELECTEDVALUE(DateTypeSelector[DateType]) TicketsOpened = CALCULATE( COUNTROWS(FactTickets), FILTER( FactTickets, IF( SelectedDateType = "CreatedDate", FactTickets[CreatedDate] IN VALUES(DisconnectedDate[Date]), FactTickets[EndDate] IN VALUES(DisconnectedDate[Date]) ) ) )You can use this for ticketsclosed as well.
This will work independantly of other relationships.
I hope this helps, please give a thumbs up and mark as solved if it does, thanks!
Anonymous
1 year agoNot applicable
Hi _bs_,
Just following up to see if the responses provided was helpful in resolving your issue. Please feel free to let us know if you need any further assistance.
Best regards,
Prasanna Kumar