Forum Discussion
PKidd
3 years agoFrequent Visitor
Sum only once when multiple selection contained in csv column value
I have a table of schools and attendance figures The school names are in in CSV format I would like to sum the attendance figures only once per selected school The school selection is dynamic and...
- 3 years ago
PKidd
3 years agoFrequent Visitor
With the data above the sum total should be the following when school or schools are selected:
| A | 47 |
| B | 36 |
| C | 26 |
| A,B | 60 |
| A,C | 47 |
| A,B,C | 60 |
| B,C | 50 |
The problem with a straight sum by split schools is that the numbers will be counted twice or more depending on the number of schools selected - when we only want something like the Excel text filter contains when
sum(
[sessions.pupils],
sessions.[schools](contains(schools.selected) = true),
)
Ashish_Mathur
3 years agoSuper User
Hi,
Share raw data in a format that can be pasted in an MS Excel file.