Forum Discussion
Single date input in Power BI
- 1 year ago
Hi vivek_babu
Power BI doesn't currently support single date selection unless you're using a dropdown or tile slicer. My usual workaround is to use a before option of the range slicer, a shape and a text box. The shape and textbox cover the min date of the slicer. They're then grouped and I ensure that maintain layer order is enabled for those three visuals
- 1 year ago
Hi vivek_babu
To meet your goal allowing users to pick a single date easily (not from a scrollable range slicer), but through search or direct input you can use a slicer with dropdown
Try this below steps :
- Add your date field to a slicer.
- In the slicer settings >> slicer visual>> More options.
- Choose “Dropdown” instead of “Between” or “List”. Click on the slicer where the dates are shown on your report.
Reference : https://databear.com/power-bi-on-screen-date-picker-no-custom-visual/
https://www.youtube.com/watch?v=zhWtU0DynCk&t=585sHope this helps !!
Thank You.. - 1 year ago
Hmm, interesting. Is it possible for you to provide us with a sample scenario a PBIX file or a screenshot using some dummy data that you're facing the issue with? Also, have you used the TREATAS function in your scenario, like in Patrick's video? It seems that this function helps perform calculations for that specific date
Thank you for replying. I am following this thread in Power BI - Single Date Picker without DAX - Microsoft Fabric Community. Checked the youtube video, implemented the single date time picker. On selection of different dates, I am unable to pass the selected date paramterer to the function(its not a stored procedure, my bad for this). I have made a relationshop as 1..* from DateDimension table =
Hi kurrysamir,
Thanks for sharing the details and references.
The CALENDAR() expression you mentioned creates a DAX date table in Power BI, it is not a function in the source database. Creating a relationship between this Date table and a DirectQuery table will only apply a filter to the results returned from the source. It does not pass the selected date as a parameter to the source query.
If your source function requires a date parameter, Power BI currently does not support binding slicer-selected values to function parameters in DirectQuery mode.