Forum Discussion
Slicer based on another Slicer
I have this data set with sales and purchase date.
1st slicer has date_type, what I am trying is based on what user select on date_type, create another slicer with those dates for users to filter data additionally.
I have tried different steps and used selected_value DAT to identify what is selected however while applying DAX it doesnt working.
Sales date selection is ok, however if I switch to purchase_date, it still picks sales_date.Any direction/help would be appreciated.
Data Set 1:
| date_type |
| sales_date |
| purchase_date |
Data Set 2:
| id | sales_date | purchase_date | amount |
| 1 | 1/1/2023 | 2/1/2023 | 100 |
| 2 | 1/2/2023 | 2/2/2023 | 105 |
| 3 | 1/3/2023 | 2/3/2023 | 110 |
| 4 | 1/4/2023 | 2/4/2023 | 115 |
| 5 | 1/5/2023 | 2/5/2023 | 120 |
| 6 | 1/6/2023 | 2/6/2023 | 125 |
Thanks
2 Replies
- AMeyersen
Resolver III
You can do this using field parameters.
- Enable preview feature field parameters
- create a new field parameter containing your two date columns
- copy the auto-created slicer
- on the second slicer, select "Show values of selected fields"
There is a detailed explaination in this video
https://www.youtube.com/watch?v=2vqVTAfqrfg - Uzi2019
Community Champion
Hi tina345
You have created disconnected table. If you want your selection to be dynamic then do field parameter values.I have taken similar view of your model just ncolumn name is different.
when user select date6 from slicer then date range should be change . I have also shared the table so that you can easily understand.
Now i have selected different date from slicer
Please refer below video fr better understanding!
https://www.youtube.com/watch?v=-nqEv2YXLsU
Note:
If you take same value in both slicer it will not show you as you can see in my screenshotFor date range slicer please take table then add parameter value then convert your table into slicer value.
if you directly take parameter value in slicer then will show you like this
so take table visual then add paramter value in it.
then convert your table into slicer visual
See you will see the desired result.
I hope I answered your question!