Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Use slicer to select which column to sum

Hi everyone,

 

I have a table with 30 columns, say C1...C30. And need to create a dashboard where a user can use slicer to pick which column to sum, and output it on a graph. E.g. when user selects C7 on slicer, then the graph plots a sum of column [C7].

 

I know one way to achieve this is to create 30 measures and use SWITCH() function. But is there a way to create just single measure and reference column name with a variable?

 

Thank you!

2 Replies