Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
KRZYSZTOFB
Frequent Visitor

DatePicker for SQL Query

Hello, 

It's there any possibility to have date picker to import data from SQL server?

In my file I'm using two parameters with date and time in my SQL query.

 

 

Best regards

Krzysztof

3 REPLIES 3
v-henryk-mstf
Community Support
Community Support

Hi @KRZYSZTOFB ,

 

According to your description, when the date parameter is used in conjunction with a PowerBI query, an error message of the following type appears.

We cannot apply operator & to types Text and Date.

Just like below:

vhenrykmstf_0-1658134832840.png

The best way is to set the dynamic start date and end date for the date table in Power Query after successfully connecting to the sql data source, the detailed steps can be found in the following blog.

Using A Dynamic StartDate & EndDate For Power BI Query Date Tables (enterprisedna.co)


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@KRZYSZTOFB , No , It has table from Power bi Table.

 

Check if the Dynamic M parameter can help https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-dynamic-m-query-parameters

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hello,

I have created file according to link You have shared.

Filtering works properly but since i've bind my table to parameter, I'm not able to use calendar on slicer. 

I have only two options visible: List and Dropdown:

KRZYSZTOFB_0-1658235838140.pngKRZYSZTOFB_1-1658235869929.png

Field is slected properly - as Date.

Everything was fine before binding.

Do you have idea how to fix this?

 

Best regards

K.B

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.