Forum Discussion
How to make a dynamic custom SQL query based on given date from the dateslicer?
In that case you may have more luck using dynamic M parameters, but it's quite a bit more in-depth as a solution:
https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-dynamic-m-query-parameters
Pete
Thanks a lot! I managed to get it to work. However, I now have to 'dropdown-slicers' where a user has to scroll down really far to check the appropiate dates.. Is it possible to create a dates slicer where they have a date picker menu to easil y pick dates?
- BA_Pete2 years agoSuper User
If you select your date slicer and go to Visual > Slicer Settings > Options > Style, you can change the slicer type to all sorts of different types:
If you use Between, Before, or After, this will create a slider with date entry fields with calendars behind them. If you make the slicer really small, the slider part of it will disappear and you'll just be left with the date entry elements.
Have a play with that and see if anything works for you.
Pete
- Dion_tw2 years agoFrequent Visitor
Yes, I knew if was possible in the settings. However, I don't have the option 'Between', 'Before' and 'After'. Maybe it has something to do with the parameter/data I am using?
- BA_Pete2 years agoSuper User
Is your parameter defined as Text type instead of Date type?
Pete