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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Asazaky
Regular Visitor

Power BI: Change url parts

Hello,

 

Is possible create a filter for update the two field in the url bellow ?

 

URL:

 

http://sbripvs0022/CronetJVX/pido/getData?p_pido=50000000681&SHIFT_DATE2=21082020000000&SHIFT_DATE1=23082020000000&p_crosscompany=0&p_format=XML&p_querytimeout=180&p_userid=TVEN/tven@cronet_cpbritu1

 

1 - Create URL - DataBase;

 

2 - Create a filter;

 

3 - The values 21082020 and 23082020 would be changed (by the filter);

 

4 - Columns and rows will be updated.

 

This url are create columns and rows, when I altering the two dates, the table updated.

 

Please I need your help.

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @Asazaky 

You can structure the Web.Contents call like this

 

let
    SD1 = "21082020",
    SD2 = "23082020",
    url = "http://sbripvs0022/",
    path = "CronetJVX/pido/getData/",

    p_pido = "50000000681",
    SHIFT_DATE1 = SD1 & "000000",
    SHIFT_DATE2 = SD2 & "000000",
    p_crosscompany = "0",
    p_format = "XML",
    p_querytimeout = "180",
    p_userid= "TVEN/tven@cronet_cpbritu1",

    data= Web.Contents(url,
   [ 
     RelativePath = path,
     Query = [ 
                p_pido = p_pido, 
                SHIFT_DATE1 = SHIFT_DATE1, 
                SHIFT_DATE2 = SHIFT_DATE2, 
                p_crosscompany = p_crosscompany,
                p_format = p_format,
                p_querytimeout = p_querytimeout,
                p_userid = p_userid
            ]
   ] )

in data

 

The Shift Date values SD1 and SD2 can be passed in by using parameters.

Regards

Phil


If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

2 REPLIES 2
PhilipTreacy
Super User
Super User

Hi @Asazaky 

You can structure the Web.Contents call like this

 

let
    SD1 = "21082020",
    SD2 = "23082020",
    url = "http://sbripvs0022/",
    path = "CronetJVX/pido/getData/",

    p_pido = "50000000681",
    SHIFT_DATE1 = SD1 & "000000",
    SHIFT_DATE2 = SD2 & "000000",
    p_crosscompany = "0",
    p_format = "XML",
    p_querytimeout = "180",
    p_userid= "TVEN/tven@cronet_cpbritu1",

    data= Web.Contents(url,
   [ 
     RelativePath = path,
     Query = [ 
                p_pido = p_pido, 
                SHIFT_DATE1 = SHIFT_DATE1, 
                SHIFT_DATE2 = SHIFT_DATE2, 
                p_crosscompany = p_crosscompany,
                p_format = p_format,
                p_querytimeout = p_querytimeout,
                p_userid = p_userid
            ]
   ] )

in data

 

The Shift Date values SD1 and SD2 can be passed in by using parameters.

Regards

Phil


If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.