Forum Discussion
jdugas
Advocate I
9 years agoSum based on Different Column
Is it possible to create a calculated column to sum all column names that begin with "ANSWERx" where "x" is either a single digit or double digit? I'm trying to find a score for survey results.
- 9 years ago
Hello,
People here have given great ideas. This question is complicated. Maybe there is no easy answer. You can try this.
- Add an index to the table in Query Editor.
- Choose three columns with CTRL. Then click Unpivot Columns.
- Create a measure.
Average =
SUM ( Table1[Value] ) / COUNT ( Table1[Value] )
v-jiascu-msft
Microsoft Employee
9 years ago
Hello,
People here have given great ideas. This question is complicated. Maybe there is no easy answer. You can try this.
- Add an index to the table in Query Editor.
- Choose three columns with CTRL. Then click Unpivot Columns.
- Create a measure.
Average =
SUM ( Table1[Value] ) / COUNT ( Table1[Value] )
v-jiascu-msft
Microsoft Employee
9 years ago- jdugas9 years ago
Advocate I
I honestly can't remember the exact reason or details on how to make this work but I accomplished this by using the "unpivot columns" function in power query. I think that's what you call it.