Forum Discussion
single date picker in powerbi
hi
i need to select single date in my report so that business have greater interaction with the date visual . I know that single date picker will be vailable in list or dropdown but i dont need that since i have the data for long dates and business finds it hard for selection and where you don't have search option too .
If we don't have anything can you guide if i select the from date in the date slicer ,is there a way that end date is by defualt selcted from to date and so that i can achieve this functionality .
can anyone help me here ?
21 Replies
- andres777
Advocate III
I really do not like some solutions that involve covering up date controls to make it look like it works fine.
We had many users pushing us (BI Analyts) to come up with a more professional solution that works well and looks good.
So I had to write my own custom Visual DatePicker (and go through the steep learning curve to learn all: Node Js, Ms Code, JavaScript, XML Parameters, Syncfusion parameters, Power BI compilation process, Sync calendars, etc) it took me around 2 months or more to come up with something end users would love and accept to use.
Since I didn't want to reinvent the wheel, I searched and searched all over to find some source code I could re-use inside Power BI environment. Because Power BI acts and works like a website, I thought I should look for javascript components. So I found and purchased the SyncFusion Essential JS 2 libraries, just to use one control, the datePicker, the other 59 controls are available for us to use at another time if we want...
A sample of how their calendar datepicker works in on their demo page... Link
Disclaimer : I don't work for SyncFusion or get paid by them to say these comments, I'm just a frustrated user that wanted a professional solution inside Power BI, which according to most users, should be out by now.
Clicking on a Day will select that date, clicking on "May 2020" will allow you to select the Month, and further down, clicking on the "2020" will allow you to select the Year. Very simple, elegant and professional.
picking a day ;
picking a Month
picking a Year :
pick a year
This is what mine looks inside Power BI...
Users click on the Calendar Icon, and I bring the bookmark Page that contains the
DatePicker Control. Allowing them to select ONE, single date.
(I removed some labels from the grid, to protect the inocent :)...)
I created this custom vizual + icon image
Hope this helps some people...
Andres
- AnonymousNot applicable
Hi andres777,
your solution looks very promising. Would you mind to share it with us? I'd love to use your visual too, it would be great if you could publish your code or your pbiviz file anywhere. 🙂
Best,
Christoph
- andres777
Advocate III
Hi All,
I'm glad to share the code for this custom date picker,
Because it was done as a one-time-only, and as a rush project
there are some things I would love to change :
- It defaults to today()-2 days, when you open the calendar in a report (as requested by my end users)
- It selects values from a table called Calendar, which I used to synchronize data from other tables in my model.
- If you need to re-compile, it would need the Syncfusion libraries which are about $450/yr
- Compiled viz can be distributed, according to syncfusion website.
When I get a bit more time, I would like to program more features so parameters can be entered by users for :
default dates, Date Table, specific date field to use, color of calendar, display mode, etc
Thanks for all
Andres777 at gmail
- AnonymousNot applicable
Hi Andres, this is just what I'm looking for! thanks for the hardwork. Could you please share me the name of your custom visual? because I can't find it,
Kind regards,
Gaby- andres777
Advocate III
Hi Gaby,
I wrote the custom vizual myself, with the help of a Syncfusion library that contains the graphics in Node js
- AnonymousNot applicable
Hey andres777
Great job on creating the single date picker. This is exactly what I was looking for.
Would you be able to provide visual file or the code you used together with the instructions on how to implement it?Thanks!
- AnonymousNot applicable
Hi Anonymous ,
Look at this video from Guy in a Cube.
https://www.youtube.com/watch?v=zhWtU0DynCk
You will need to use TreatAs for some of your measures.
Regards,
Harsh Nathani
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
- jsh121988
Microsoft Employee
Search isn't available on Date type, but it is available on Text type. Create a new calculated column, and set it to a type of Text. You can use Sort By another sorted column if you wan to get fancy with the format output.
DateText = FORMAT([Date], "yyyy-MM-dd")
- RCS3Frequent Visitor
Sorry for re-emerging and old post. I have a similar requirement where the single date picker should show specific columns from the data source on a matrix. I tried the method provided in NEXT LEVEL Power BI Date Picker! - YouTube link. The date picker works perfectly but we should have a measure to call required columns for the matrix to visualize which I do not know how to do since I'm a beginner. Any suggestions anyone?
- torsten
Helper II
Here a short description how this can be achieved.
- torsten
Helper II
Here a short description how this can be achieved. Hope this helps 🙂