Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
When trying to connect to a rest API directly in powerBI I am unable to import any informaiton. This is the query link- https://www.vegvesen.no/nvdb/api/v2/vegobjekter/570?
There are two problems
1. I am unable to see any data when I make an import in PBI
2. The information returned from the API is hierachical (i.e. the data table contains links each entry in the dataset). How do I import the complete dataset at once into PBI?
Hi @nedwin,
You can use below Power Query to get data:
let
Source = Json.Document(Web.Contents("https://www.vegvesen.no/nvdb/api/v2/vegobjekter/570")),
objekter = Source[objekter],
#"Converted to Table" = Table.FromList(objekter, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"id", "href"}, {"Column1.id", "Column1.href"})
in
#"Expanded Column1"
Best Regards,
Qiuyun Yu
Thank you for your reply. As you see in your picture the second column of the response you get is a link. This link contains the next level of the hierachy in the data that I want to extract. Any way I can get this next level of data reported in this table?
| User | Count |
|---|---|
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 15 | |
| 8 | |
| 6 | |
| 5 | |
| 5 |