Forum Discussion
Use variable in measure
- 6 years ago
Hi Milozebre ,
You can modify your formula as below:
Measure = SWITCH(SELECTVALUE(SI(GAUCHE(CV_calculation_rule;1)),"1";SELECTEDVALUE(CK2); "2";SELECTEDVALUE(CL2);"4";SELECTEDVALUE(CM2);RECHERCHEV(A2;'Comp database'!A:V;22;0))I'm not sure what does "SI""GAUCHE""RECHERCHEV"mean?Are they all tables' names?The measure can be simply described as :
measure= SWITCH([measure],"case 1","value 1","case 2,"value 2",...[else])Best Regards,
KellyDid I answer your question? Mark my post as a solution!
In the hopes others may benefit:
I suggested using a slicer or buttons. If you use a slicer, you would do something like create a slicer table like:
Choices
| Options |
| Option1 |
| Option2 |
| Option3 |
| Option4 |
And then a measure like:
Measure =
SWITCH('Choices'[Option],
"Option1",<some calculation>,
"Option2",<some other calculation>,
"Option3",<some other other calculation>,
"Option4",<some other other other calculation>
)
So, for the <some calculation> stuff, those would be good if each of those was a separate measure that handled it.
I am still not sure I understand the actual question though or what you are going for.