Forum Discussion
Anonymous
3 years agoNot applicable
problem: Extracting lists and refer to query table
Dear Community, I have a question concerining extracting lists in Power Query. So in my query I have multiple columns. One of them ist called "TeamID" an contains numbers. Another one is called "...
- 3 years ago
Hi Anonymous
You may try the following code for a new column:
= let vTeamId = [TeamID] in List.Sum(List.Transform([statistics], each if [team_id] = vTeamId and Record.HasFields(_, "details") then List.Sum(List.Transform(_[details], each if _[type_id] = 321 then _[value][total] else 0)) else 0))
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
ppm1
3 years agoSolution Sage
Why not just parse the JSON with Json.Document to simplify things? You may need to add/remove characters to create valid JSON but should still be easier.
Pat