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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
hxkresl
Helper V
Helper V

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors