2

I have an xml that i'm processing and my output is the below image:

Print1

The problem is that i get 2 columns and one has a nested table inside and the other one just the value.

My output need to be something like this:

Print2

Can anybody help?

2
  • Is there a way we can reproduce this? Commented Apr 11, 2018 at 17:46
  • Please edit the additional information into your question Commented Apr 11, 2018 at 18:07

1 Answer 1

1

Try adding a new custom column like this:

= Table.AddColumn(PreviousStepNameHere, "FREQ Expanded",
      each if Value.Type([FREQ]) = Value.Type("text") then [FREQ]
           else Table.ToList([FREQ]))

And then expand that new column using this code:

= Table.TransformColumns(#"Added Custom", {"FREQ Expanded",
      each if Value.Type(_) = Value.Type("text") then _
           else Text.Combine(List.Transform(_, Text.From), ","), type text})

If your type for non-tables is something else, then adjust accordingly.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.