Forum Discussion
Anonymous
6 years agoNot applicable
Dynamic Select Column via Variable DAX
Hi All, is it possible to use a variable to select dynamically a column? Example TABLE A -------------------- NewColumn = var name_column = "Column" & (5+1) return ---> Here I want to r...
- 6 years ago
Hi Anonymous,
Only way I can think of is to create a switch statement:
new column = SWITCH ( yourCalculationValue, 1, column1, 2, column2, . . . . . 6, column6, blank )Cheers,
Sturla
If this post helps, then please consider Accepting it as the solution. Kudos are nice too.
sturlaws
Resident Rockstar
6 years agoHi Anonymous,
Only way I can think of is to create a switch statement:
new column =
SWITCH (
yourCalculationValue,
1, column1,
2, column2,
.
.
.
.
.
6, column6,
blank )
Cheers,
Sturla
If this post helps, then please consider Accepting it as the solution. Kudos are nice too.