Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi Team,
I am pulling data from MongoDB in Power BI and data is in document format.
(
id:- 1
name :- Shubham
Position :- Developer
}
(
id:- 2
name :- Swapnil
Position :- Senior Developer
}
(
id:- 3
name :- Fayaz
}
Now this is supposed to be 3 rows and 3 columns in Power BI, but Position column is not avaialble in 3rd JSON due to which it only id and name by excluding Position column from entire dataset.
id | name |
1 | Shubham |
2 | Swapnil |
3 | Fayaz |
But i wanted to result to be like this :-
id | name | position |
1 | Shubham | Developer |
2 | Swapnil | Senior Develop |
3 | Fayaz | null |
Could you please help me with this ?
hi @Anonymous
I have test on my side, it works well.
and here is power query code:
let
Source = Json.Document(File.Contents("C:\Users\linli\Desktop\test.json")),
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"id", "name", "Position"}, {"id", "name", "Position"})
in
#"Expanded Column1"
Regards,
Lin
@Greg_Deckler Please find corrected JSON
[{
"id": 1,
"name": "Shubham",
"Position": "Developer"
},
{
"id": 2,
"name": "Swapnil",
"Position": "Senior Developer"
},
{
"id": 3,
"name": "Fayaz"
}
]
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
79 | |
73 | |
58 | |
36 | |
32 |
User | Count |
---|---|
90 | |
62 | |
61 | |
49 | |
45 |