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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Yass_Pbi
Frequent Visitor

Use Web.contents( ) with Query & RelativePath parameters for Json Data List in Power Query M

Hello,

 

I want to parametrize this URL using Relative Path and Query functions inside Custom M Function, here my URL and my code:

URL = "http://newapi.omni.com/1.13/Omni.svc/GetRelationListJson?json={TypeIDs: 10,ObjectID: "& property_id &",LanguageId: 2, CustomerName: CustName, CustomerPassword :Pass}"

property_id = Parameter used as Invoke Custom Function 

 

Source = (Property as number) as table =>

let
    property_id = Number.ToText(Property),
   

    Source = Json.Document(Web.Contents(URL_BODY,
   [RelativePath= "GetRelationListJson?json={TypeIDs: 10,ObjectID: "& property_id &",LanguageId: 2, CustomerName: CustName, CustomerPassword :Pass}"])),

......

 

This work only in Power BI Desktop, I have error in Power BI Service : [Unable to combine Data] ......

 

To fix this issue, I folowed CHRIS WEBB Blog, but unfortunately he didn't gave us an example with a json list.

I tried this, but it's not working: 

 

Source = Json.Document(Web.Contents(URL_BODY,
[RelativePath= "GetRelationListJson",
Query =
          [
            json=
                    {
                      TypeIDs= 1,
                      ObjectID= property_id,
                      LanguageId= 2,
                      CustomerName= "Cust",
                      CustomerPassword= "Pass"
                    }

            ]

 

Any idea on how to handle with list of Json inside Query function of URL please?

 

Thank's in advance for your help

6 REPLIES 6
v-tangjie-msft
Community Support
Community Support

Hi @Yass_Pbi ,

 

You can go to:

File=>Options and Settings=>Options and set the Ignore Privacy Levels option.

 

If 'Privacy Settings' can not be your workaround, maybe you can try to use data flows.

For more information, you can refer:

https://www.meanttobi.com/power-bi-refresh-error-unable-to-combine-data-workaround/

 

You can refer to the following posts that may be helpful to you:

Online Refresh Error when desktop refresh works fi... - Microsoft Power BI Community

 Define and invoke function within query - Microsoft Power BI Community

 Unable to Combine Data - Custom Function - Microsoft Power BI Community

 

Best Regards,

Neeko Tang

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

Hello @v-tangjie-msft ,

 

Thank for different links.

 

I've tried all these workaround before, Unfortunately I have the same error in Power BI Service:

1. Combine all different queries in single one query.

2. Use Query parameter with Relative Path in URL

3. Set Privacy Setting in PBI Desktop to (Always Ignore Privacy Level).

 

 

 

Hi all,

 

It works only with DataFlow, which means I need to upgrade all the licenses of my customer (Pro to PPU). It's very weird that we are obliged to use DataFlow to handle with this issue

Hi @Yass_Pbi ,

 

Has your problem been solved? If the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out. Thanks in advance.

 

Best Regards,

Neeko Tang

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

Hello @v-tangjie-msft ,

 

I found a workaround ( Using DataFlow), so it's not solved yet with Power Query.

 

Best regards, 

Yass_Pbi
Frequent Visitor

I tried this: 

Source = Json.Document(Web.Contents(URL_BODY,
[RelativePath= "GetRelationListJson",
Query =
          [
           json=
           "{
              ""TypeIDs"": ""1"",
               ""ObjectID"":" & property_id&",
               ""LanguageId"": ""2"",
               ""CustomerName"": ""Cust"",
               ""CustomerPassword"": ""Pass""
               }"

            ]
      ])),

 

It works in PBI Desktop, but I'm facing the same error in PBI Service: 

[UNABLE to Combine Data] ............ 

 

Anyone can help please?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.