Forum Discussion
Interaction between date slicer and line chart
Hi everyone.
I need a line chart to be responsive when one date is selected from a date slicer. For example, if the selected date is december 31st, 2019, line chart should look like:
But, if I change the date to may 31st, 2019, line chart should be:
I was able to get this done but I'm not really sure if my approach is good. Maybe there is a better one, more efficient. So please I need your comments and suggestions.
My approach
The model:
As you can see I created a disconnected table for the date slicer. The measures I used are:
Hi fabo ,
This is a good approach, however you can also try one of other two options to not make another unrelated table:
- Make the slicer a Before or a Between slicer and that will return the values based on that selection
- Ohter option is to make the relationship between Date and Fact Table disable and the making use of the USERELATIONSHIP function create the measure that need the active relationship between both tables and use the same function as you have but with only one date table.
Regards,
MFelix
2 Replies
- MFelix
Super User
Hi fabo ,
This is a good approach, however you can also try one of other two options to not make another unrelated table:
- Make the slicer a Before or a Between slicer and that will return the values based on that selection
- Ohter option is to make the relationship between Date and Fact Table disable and the making use of the USERELATIONSHIP function create the measure that need the active relationship between both tables and use the same function as you have but with only one date table.
Regards,
MFelix