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
Anonymous
Not applicable

API - Columns became rows

Edit: Solved, I was going about this the wrong way. Transpose columns before expanding rows and it works. Whoops 

 

First time trying to use an API directly into Power BI and ran into some issues, or maybe I'm just doing it wrong?

I'm getting data from Statistics Sweden (Swedish government agency) through this link.  Which I add as a "web" data source in Power BI.

 

What I want is a column for each of the categories with rows of values, like this:

 

regiontypetablecontent2020K12020K22020K32020K4
xza1174117216591232
xza29619688731004
xyb1116575469
xyb29411746118

 

But instead I get this:

 

codetextvaluetextselimination
Regionregion[List]TRUE
Hustyphustyp[List]TRUE
ContentsCodetabellinnehåll[List]null
Tidkvartal[List]null

 

And if I expand the [List] to new rows I just get a long list with the data in a single column like mentioned. 

Am I missing something in the previous "Applied Steps" in my query settings?

Thanks 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks, I was doing it wrong...

If i Transpose the columns before expanding the lists it works. 

View solution in original post

2 REPLIES 2
v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

Try to connect to this data source and expanded the List. Then, transform the table.

v-lionel-msft_0-1620198781584.png

 

Best regards,
Lionel Chen

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

 

 

Anonymous
Not applicable

Thanks, I was doing it wrong...

If i Transpose the columns before expanding the lists it works. 

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.