Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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 return the values of "Column6" (5+1), based on variable "name_column" who has been calculated dynamically <----
Thanks
Solved! Go to Solution.
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.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
57 | |
49 | |
44 | |
18 | |
18 |