Continuing the toggle questions. I have data in Celsius. Managed, with help, to create a variable and a button that toggle between Celsius and Fahrenheit. Just for fun I wanted to add Kelvin as well- It was proposed to me that I in my loading script create a column for each suffix.
So I'm loading: Medeltemp as medeltemp_c, 1.8*Medeltemp+32 as medeltemp_f, Medeltemp+273 as medeltemp_k
Now I should be able to refer to the columns with a concat function: =concat('medeltemp'&vTemp), works like a charm. =max(concat('medeltemp'&vTemp)), don't work...
medeltemp_f should then give 71.96 and medeltemp_k 295.2 All these values are in one table. The variable holds only _c (for Celsius), _f or _k. Toggeled by a button that actualy changes the variable with an if-statement. The idea is to use medeltemp + variable to show the selected value.