cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SETHNE
Helper I
Helper I

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

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 @SETHNE ,

 

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.

 

 

Thanks, I was doing it wrong...

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

View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors