Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello hopefully this is pretty straightforward.
I am wondering if it is possible to have a date slicer on my page, but allow the user to toggle between two dates. For example, I have order date and due date. I want to have just one date slicer on the page, but allow the user to select "Order Date" or "Due Date" from another slicer. Based on their selection, I want the date slicer to use the appropriate date field. Is that possible? I have looked into a slicer table and then a measure, but in the measure I am not sure how to return the date values to use in a slicer, only to return calculated values such as counts and totals.
Solved! Go to Solution.
Hi @aallman
I would recommend using the method described here:
https://www.sqlbi.com/articles/using-calculation-groups-to-switch-between-dates/
This article includes a video and sample files.
In your case, this method would involve:
With this method, the 'Date'[Date] columnis always used on the Date slicer, but the column that it has an active relationship with is switched using the calculation group.
Does something like this work for you? Please post back with more detail if needed.
P.S. Field parameters are another option for switching the column used in a slicer or an other visual, but I would say that the calculation group makes better sense from a modelling point of view in this case.
Hi @aallman
I would recommend using the method described here:
https://www.sqlbi.com/articles/using-calculation-groups-to-switch-between-dates/
This article includes a video and sample files.
In your case, this method would involve:
With this method, the 'Date'[Date] columnis always used on the Date slicer, but the column that it has an active relationship with is switched using the calculation group.
Does something like this work for you? Please post back with more detail if needed.
P.S. Field parameters are another option for switching the column used in a slicer or an other visual, but I would say that the calculation group makes better sense from a modelling point of view in this case.
User | Count |
---|---|
15 | |
13 | |
12 | |
10 | |
10 |
User | Count |
---|---|
19 | |
15 | |
14 | |
11 | |
10 |