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!
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])
Kelly
- Milozebre6 years agoHelper V
Hello v-kelly-msft
Thank you for your reply.
In english its = If(Left(CV_calculation_rule) = "1",CK3;(SI(Left(CV_calculation_rule)="2";CL3;IF(Left(CV_calculation_rule) ="4", CM3;(Vlookup(A3;'Comp database'!A:V;22;0))))
CV_calculation-rule = name of my list
CK3, CL3, CM3 = columns
Comp database = name of a sheet.
In my case, I dont have the sheet in Power BI
If I selected 1 from my parameter then do (columnA * Column B or a measure who do that); If I selected 2 from parameter then do (another calcul or measure), ...
I have only 4 choices.
And I'm talking about a parameter, but is it really a parameter that I have to do? And if so, is it a parameter that I create so that it is requested at startup (Transform Data - Manage parameter) or Modeling New parameter what if