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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
paulinuk2017
Frequent Visitor

Add 2 date pickers and pass values to stored procedure

Hello

Is it possible to place 2 date pickers into a report then add a button

I can then call a stored procedure and show it’s data?

My user wants to compare a set of values between 2 days

Paul
1 ACCEPTED SOLUTION
v-sihou-msft
Employee
Employee

@paulinuk2017

 

Based on your description, it seems you want to apply query parameter in your stored procedure to retrieve data. We are able to use the query parameter to retrieve data. 

 

123.PNG

 

However, it's not possible to populate a date picker into query parameter. And we can't only use "Query" type parameter in a query, which means we have to use "Any Value" or "List of Values". 

 

234.PNG

 

For your requirement, if you just need to filter records between two days, you can directly use a "Between" Data slicer.

 

Capture.PNG

 

Regards,

 

 

View solution in original post

3 REPLIES 3
v-sihou-msft
Employee
Employee

@paulinuk2017

 

Based on your description, it seems you want to apply query parameter in your stored procedure to retrieve data. We are able to use the query parameter to retrieve data. 

 

123.PNG

 

However, it's not possible to populate a date picker into query parameter. And we can't only use "Query" type parameter in a query, which means we have to use "Any Value" or "List of Values". 

 

234.PNG

 

For your requirement, if you just need to filter records between two days, you can directly use a "Between" Data slicer.

 

Capture.PNG

 

Regards,

 

 

Could you please reply in brief I had same kind of situation but I had no date field on main query how can I do this. I need a seperate slicer that is going to call the proc parameters which should be same startdate and enddate. StartDate would be the starting day of year and enddate is todaysdate

GilbertQ
Super User
Super User

Hi @paulinuk2017


What I have done in the past is to have all the data in a dataset and then by using Dynamic Filters and slicers getting the values selected and then using them to do a comparison.

 

I do have a blog post that relates to Change Tables, and the only difference is that you would use the dates as what you wanted to compare in the Change tables.

 

https://www.fourmoo.com/2017/08/22/power-bi-using-change-tables-to-compare-data/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors