Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
I have a variable called "Start" which I am trying to sum down the entire column. It contains only 0 or 1 and it's formatted as a whole number.
In Power Query I have:
= Table.AddColumn(#"PREVIOUS STEP", "Start Total", each List.Sum([Start]))
but I keep getting the message:
"Expression.Error: We cannot convert the value 1 to type List.
Details:
Value=1
Type=[Type]"
Why can I not add numeric values?
Is there another way of doing this? I don't care whether I do it in Power Query or as a new measure.
Solved! Go to Solution.
Hello @AJPF
you get this error because List.Sum is expecting a list, but you are feeding the function a number. I don't know whats the goal you are trying to achieve. I suppose you would like to sum the whole column start. This however would result in the same number in every row, as you are not filter the column before. If this is it what you would like to achive use this formula
= Table.AddColumn(#"PREVIOUS STEP", "Start Total", each List.Sum(#"PREVIOUS STEP"[Start]))
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
Hello @AJPF
you get this error because List.Sum is expecting a list, but you are feeding the function a number. I don't know whats the goal you are trying to achieve. I suppose you would like to sum the whole column start. This however would result in the same number in every row, as you are not filter the column before. If this is it what you would like to achive use this formula
= Table.AddColumn(#"PREVIOUS STEP", "Start Total", each List.Sum(#"PREVIOUS STEP"[Start]))
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |