Forum Discussion
Anonymous
4 years agoNot applicable
How can I calculate average for multiple columns?
I have 100+ columns and need an average for each one but don't want to create 100+ measures to compute the average for each one. Is there a faster way to do this, e.g. can I make just one measure and...
- 4 years ago
Anonymous
pls see the attachment below
ryan_mayu
Super User
4 years agoAnonymous
could you pls provide the sample data and expected output?
Anonymous
4 years agoNot applicable
Hi ryan_mayu ,
Not sure how to attach excel files as I don't see the option but I have shown a small subset of my data below. I want to create an average for all the value columns, i.e. value_00 and value_01. In my actual dataset this is about 60 columns so will be cumbersome to create a measure for every column.
| TagName_00 | DateTime_00 | Value_00 | TagName_01 | DateTime_01 | Value_01 |
| xxxx | 10/01/2022 12:30:00 | 20 | yyyy | 10/01/2022 12:30:00 | 40 |
| xxxx | 10/01/2022 13:30:00 | 30 | yyyy | 10/01/2022 13:30:00 | 60 |
- ryan_mayu4 years ago
Super User
Anonymous
you can select both value column and unpivot columns
if you have 60 value columns, you can select 60 columns and unpivot
then you can create a measure
average(value)