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.
Hello people
I am new to Power Query and I am trying to get data using an api.
The source is this:
https://api.statbank.dk/v1/data
The script is this:
{
"table": "FOLK1a",
"format": "BULK",
"valuePresentation": "Code",
"delimiter": "Semicolon",
"variables": [
{
"code": "OMRÅDE",
"values": [
"084"
]
},
{
"code": "Tid",
"values": [
"2010K1",
"2015K1",
"2020K1"
]
},
{
"code": "CIVILSTAND",
"values": [
"U"
]
},
{
"code": "KØN",
"values": [
"1",
"2"
]
},
{
"code": "ALDER",
"values": [
"25",
"45",
"65"
]
}
]
}
The expected output is this:
OMRÅDE;TID;CIVILSTAND;KØN;ALDER;INDHOLD
084;2010K1;U;1;25;10281
084;2010K1;U;1;45;3806
084;2010K1;U;1;65;872
084;2010K1;U;2;25;10290
084;2010K1;U;2;45;2823
084;2010K1;U;2;65;688
084;2015K1;U;1;25;13072
084;2015K1;U;1;45;3586
084;2015K1;U;1;65;1102
084;2015K1;U;2;25;13162
084;2015K1;U;2;45;2687
084;2015K1;U;2;65;829
084;2020K1;U;1;25;14604
084;2020K1;U;1;45;4066
084;2020K1;U;1;65;1405
084;2020K1;U;2;25;14848
084;2020K1;U;2;45;3300
084;2020K1;U;2;65;1171
I hope you can help me by creating the total script in power query based on the information above!
Kind regards
Hi @Anonymous
It is possible to connect to the api followed by the second url from amitchandak.
But it would need a proper authentication type.
Best Regards
Maggie
@Anonymous , refer if these can help
Rest API
https://zappysys.com/blog/howto-import-json-rest-api-power-bi/
https://community.powerbi.com/t5/Power-Query/Using-a-REST-API-as-a-data-source/td-p/50400
https://www.progress.com/tutorials/odbc/directquery-your-custom-rest-api-in-power-bi
https://www.youtube.com/watch?v=ipI6mrWLQKA
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.