Quantcast
Channel: All Power Query posts
Viewing all articles
Browse latest Browse all 122266

How to make a variable in connection string?

$
0
0

Hi all,

 

I've been using PowerBI for some time now and are familiar with building reports based on SQL data - for historic purpose.

 

Now, I have some restaurants and would like to get data for the past 7 days automatically each 15 minutes. The data source is a web service and the connection string looks like this:

 

https://login.onlinepos.dk/api/external/?agreementnumber=8855&username=XXX&password=YYY&function=Sales_Export&from=1470009601&to=1472515199

 

The remote system is using epoch time, thus this syntax: from=1470009601&to=1472515199

 

Somehow I need PowerBI to replace "from" with now and 7 days back and "to" with now (as in this moment)

 

Is that somehow possible?

 

If it's not possible because PowerBI doesn't allow scheduled Get Data how do I put up the possibility to manually choose a date and have it converted into a variable in the connection string?

 

Any help is appreciated, thanks.

 

Kind regards,

Morten Schaumann


Viewing all articles
Browse latest Browse all 122266

Trending Articles