Forum Discussion
jjr333
7 years agoAdvocate I
Dynamic Column calculation based on Slicer Selection
Is it possible to select a column dynamically, based on selection of a slicer item? The slicer contains the column names. I am trying to avoid having to write a number of similar Measures using SWI...
- 7 years ago
Hello Pavan,
The solution below works. But I am trying to avoid having to write many Measures.
AVE Readings = IF(HASONEVALUE(MeasuredValues[Measure]); SWITCH(SELECTEDVALUE(MeasuredValues[Measure]); "NO";[NO Ave]; "SO2";[SO2 Ave]; "NO2";[NO2 Ave]; "O3";[O3 Ave]; "PM10";[PM10 Ave]; "PM2,5";[PM2,5 Ave]; "Precip.";[Precip. Ave]; "Other" ); BLANK())
Anonymous
7 years agoNot applicable
jjr333
7 years agoAdvocate I
Hello Pavan,
The solution below works. But I am trying to avoid having to write many Measures.
AVE Readings = IF(HASONEVALUE(MeasuredValues[Measure]);
SWITCH(SELECTEDVALUE(MeasuredValues[Measure]);
"NO";[NO Ave];
"SO2";[SO2 Ave];
"NO2";[NO2 Ave];
"O3";[O3 Ave];
"PM10";[PM10 Ave];
"PM2,5";[PM2,5 Ave];
"Precip.";[Precip. Ave];
"Other"
); BLANK())