Forum Discussion
List.Zip Returning an error
- Anonymous1 year ago
Hi Rick_S137 ,
Has the issue been resolved on your end? If so, please share your solution and mark it as "Accept as Solution." This will assist others in the community who are dealing with similar problems and help them find a solution more quickly.
Thank you.
Hi Rick_S137
Could you clarify what your table currently looks like, and the end result you want?
Should the result be a table or a scalar value? I'm not clear on what you mean by "sum the columns".
From your description, I would be looking at using List.Combine and List.Sum, along with List.RemoveNulls.
I don't think List.Zip is needed here from your description.
Regarding the error you are geting, it appears to be because you are passing a null value within the "list of lists" argument that List.Zip takes.
Hi OwenAuger
My table comes from a CSV, and lookes like this:
The columns are very long, and contain a large amount of nulls, but do contain True/Falses which I have made 1/0's through change type. I want to total the amount of 1's that appears in each column so my end result will be each column name with a number representing the sum of the column for example "Column Name: 10"
For some more context my columns are so long I cannot transpose the data set without excel essentially freezing. A List is nice, but I need the 1's to be traceable back to the column they originate from (indexability) and when I take a list it records a row. The issue with list.remove nulls is i lose the idexability and no longer know which column a value belongs to. My goal was List.Zip will rearrange the lists from a row to a list of containing all values from the original column, after which I figured I would be able to list.sum.