Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Switch Column Values based on slicer selection

Hi,

I could find similar posts on this subject but they all point me at creating a calculated measure but I want to use my dynamic column as a column instead of a measure as matrix doesnt let me add a measure in place of a column.

 

I am trying to have a matrix in the below format where I want columns to switch between Monthly / Quarterly view based on slicer selection. I have created a data table in my model to be used in slicer.

 

YOA M1 M2 M3 M4 M5         |  Q1 Q2 Q3 Q4 Q5 
2010
2011
2012
.
.
.

.

I am able to calcualte this in a measure(Using switch statement) , however I am unable to achieve this in a calculated column.

 

Can someone please help me achieve this?

 

Thanks,

3 Replies