Hi i have the below JSON, would like to extract in PowerBI Query. My query is not able to extract Array's inside the JSON. I am unable to extract properties array values, where as i am able to extract user values.
Any help appreciated
Edit1: Added additional column Renames and achieved result based on @AnkUser solution
Edit2: Below JSON
I would like form the power query to return as
Workers WorkCode Place
-----------------------
Manager 134 UK
delegate 135 Europe
Authority etc
There is no relationship between these columns. However, they will be used as additional filter data for the previous Query Sample JSON
{
"Data": [
{
"Type": "Workers",
"Values": [
"Manager",
"Delegate",
"Authority"
]
},
{
"Type": "WorkCode",
"Values": [
"134",
"135",
"140",
"141",
"142",
"143",
"150"
]
},
{
"Type": "Place",
"Values": [
"UK",
"Europe"
]
}
]
}
Below Sample power query:
let
Source = Json.Document(Web.Contents("http:localhost")),
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"User", "Properties"}, {"Column1.User", "Column1.Properties"}),
#"Expanded Column1.User" = Table.ExpandRecordColumn(#"Expanded Column1", "Column1.User", {"recId", "Description", "Type", }, {"Column1.User.recId", "Column1.User.Description", "Column1.User.Type"}),
#"Expanded Column1.Properties" = Table.ExpandListColumn(#"Expanded Column1.User", "Column1.Properties"),
#"Expanded Column1.Properties1" = Table.ExpandRecordColumn(#"Expanded Column1.Properties", "Column1.Properties", {"PersonID", "HomeRef", "Designation", "EstateAgent", "Mortgage", "Broker", "Citizen"}, {"Column1.Properties.PersonID", "Column1.Properties.HomeRef", "Column1.Funds.Designation", Column1.Properties.EstateAgent", Column1.Properties.Mortgage", Column1.Properties.Broker",Column1.Properties.Citizen"})
)
in
#"Expanded Column1"
Sample data:
[
{
"User": {
"recId": "0154911",
"Description": "Lindsay Properties ltd",
"Type": "Organisation",
"Properties": [
{
"PersonID": 5636,
"HomeRef": 149065,
"Designation":"Owner",
"EstateAgent": {
"Code": "8533",
"Description": "Hunters-properties"
},
"Mortgage": {
"Code": "natwide",
"Description": "Bank limited"
},
"Broker": {
"Description": "Managecentre"
},
"Citizen": {
"UK": true,
"USA": false,
"Europe": false
}
},
{
"PersonID": 5636,
"HomeRef": 149066,
"Designation":"Owner",
"EstateAgent": {
"Code": "8533",
"Description": "Hunters-properties"
},
"Mortgage": {
"Code": "natwide",
"Description": "Bank limited"
},
"Broker": {
"Description": "Managecentre"
},
"Citizen": {
"UK": false,
"USA": false,
"Europe": false
}
}
]
}
},
{
"User": {
"recId": "0154912",
"Description": "Mr Mortimier properties",
"Type": "Person",
"Properties": [
{
"PersonID": 1636,
"HomeRef": 199065,
"Designation":"Owner",
"EstateAgent": {
"Code": "9533",
"Description": "Whitegates-properties"
},
"Mortgage": {
"Code": "Yoskhire society",
"Description": "society limited"
},
"Broker": {
"Description": "Managecentre"
},
"Citizen": {
"UK": true,
"USA": true,
"Europe": false
}
},
{
"PersonID": 1636,
"HomeRef": 199066,
"Designation":"Authority",
"EstateAgent": {
"Code": "9533",
"Description": "Whitegates-properties"
},
"Mortgage": {
"Code": "Yoskhire society",
"Description": "society limited"
},
"Broker": {
"Description": "Managecentre"
},
"Citizen": {
"UK": true,
"USA": true,
"Europe": false
}
}
]
}
}]


