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
shzyincu
Helper I
Helper I

Web service api call convert date parameter to text

I am having an issue passing date parameters to a pentaho web service, but when passing parameter as date it says:

 

Below is the call that is being made to the web service on my local machine.

Parameter name is date_start

 

Web.Contents("http://localhost:8081/kettle/executeTrans/?trans=E:\pentaho\dashboard.ktr&date_start="&date_start)

 

We cannot apply operator & to types Text and Date. I can not use data type of the parameter as text as i have used slicer on the dashboard and that parameter is passed as the starting date to it, and it only accepts the date data type param. what should i do with it?

 

1 REPLY 1
v-qiuyu-msft
Community Support
Community Support

Hi @shzyincu,

 

The syntax of Web.Contents() in Power Query is Web.Contents(url as text, optional options as nullable record) as binary. You need to deep into the pentaho web service to check if filter can be passed in URL with this format date_start="&date_start firstly. You can replace the parameter name in URL with a specific date, check if data can be retrieved.

 

Instead of pass filter in URL, you can also filter the rows when start date column in Query Editor match query parameter values, see: Deep Dive into Query Parameters and Power BI Templates.

 

Best Regards,
Qiuyun Yu

 

 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.