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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
hxkresl
Advocate III
Advocate III

Need help writing M query.

I need to import data which i can only connect to with a provided URL.

Questions: '

1.  Do I need M Query?

2.  Can someone show me script for getting data using url, looping through records returned by, and outputting tuples of data to a single table? 

 

In browser the URL produces JSON format (I am told this is JSON)

{
  /api/data/v8.1/$metadata#mc_agentsites(mc_name)","value":[
    {
      "mc_name":"vianet - Berlin","ar_x002e_mc_name":"ASG - Challant"
    },{
      "mc_name":"Aloa Tama","ar_x002e_mc_name":"AS - MAST - Advertiser Services"
    },{
      "mc_name":"Aloa Tama","ar_x002e_mc_name":"AS - MAST - Advertiser Support"
    }
  ]
}

I pull into pbi using Get Data -> Web and it looks like this:

 

Capture4.PNG

 

Converted to Table

 

 

List expanded show many records:

Capture5.PNG

 

Single record expanded:

Capture6.PNG

 

I can expand only one record at a time.  If I expand a second it over writes the previously expanded record.

 

 

2 ACCEPTED SOLUTIONS

do not expand the records. Instead, when you're here:

Capture5.PNG

 

look at the menu bar on top and you'll see the List Contextual Menu. In it, you'll see an option (icon) that reads "Convert to Table". Click on that

View solution in original post

now click on the icon right next to the column name. its an icon that has like 2 arrows that go in opposite directions. That will expand all of the records in that column

View solution in original post

9 REPLIES 9
miguel
Community Admin
Community Admin

When you get to the "Expanded List" step, look above on the UI and you'll see an option that says something like "Conver to Table". That will conver the list into a table. Once its in a table, your column that holds all of the records will have a new icon right next to it to expand all of the records into a single table

Hi Miguel, i was editing my post when you replied.

When I convert to table I do not get those arrows, instead only list

 

 

 

click on the list and then once you're inside the list you need to conver that into a table

Miguel,  when i click on List it expands to records, with no visible option to convert to table.  Records expand to one tuple of data.

do not expand the records. Instead, when you're here:

Capture5.PNG

 

look at the menu bar on top and you'll see the List Contextual Menu. In it, you'll see an option (icon) that reads "Convert to Table". Click on that

Oh OK.  What delimeter to use for JSON which is delimeted with squiggly parenthesis?

Capture.PNG

 

I used 'none' for delimeter.  It worked! Thank you Miguel.

now click on the icon right next to the column name. its an icon that has like 2 arrows that go in opposite directions. That will expand all of the records in that column

Yes, thanks for walking me through Miguel. Glad to have the data in PBI finally.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.