The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello Everyone,
I have imported some data into PowerBi from an Azure Storage Blob. I am trying to do some transformations of the data, much of which was automated. I was able to get the advanced view below, and understand that query needs to be modified to correct the error, but how do I go about doing that?
let
Source = (Parameter1) => let
Source = Json.Document(Parameter1),
#"Converted to Table" = Table.FromRecords({Source}),
#"Expanded value" = Table.ExpandListColumn(#"Converted to Table", "value"),
#"Expanded value1" = Table.ExpandRecordColumn(#"Expanded value", "value", {"id", "userPrincipalName", "officeLocation", "assignedLicenses"}, {"value.id", "value.userPrincipalName", "value.officeLocation", "value.assignedLicenses"}),
#"Changed Type" = Table.TransformColumnTypes(#"Expanded value1",{{"@odata.context", type text}, {"@odata.nextLink", type text}, {"value.id", type text}, {"value.userPrincipalName", type text}, {"value.officeLocation", type text}, {"value.assignedLicenses", type any}})
in
#"Changed Type"
in
Source
Hi @Cepheus ,
You mean @odata.context? Change #"Changed Type" step to this:
#"Changed Type" = Table.TransformColumnTypes(#"Expanded value1",{{"@odata.nextLink", type text}, {"value.id", type text}, {"value.userPrincipalName", type text}, {"value.officeLocation", type text}, {"value.assignedLicenses", type any}})
This removes the transformation applied to non-existing column @odata.context ( {"@odata.context", type text}, )