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.
Hello Community,
I hope you are well and that containment is not too difficult.
I have a problem with the parameters and my measurements.
I am doing my math class and I would like to make a variable that to an extent that calculates according to my choice.
The best thing would be for me to make this choice as soon as I open my file pbit, but if this is not possible then choose from the file. Example if I chose the Poisson distribution, then I calculate (formula or another measure), if I chose another, then another calculation. I watched videos on youtube on selectedvalue with switch but I can't
Here is my formul in Excel and its works
=SI(GAUCHE(CV_calculation_rule;1)="1";CK2;(SI(GAUCHE(CV_calculation_rule;1)="2";CL2;SI(GAUCHE(CV_calculation_rule;1)="4";CM2;RECHERCHEV(A2;'Comp database'!A:V;22;0)))))
CV_calculation_rule is my list
CK2, CL2, CM2 are column with formule that I can do in power bi.
Thank you
Solved! Go to 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])
Dear community,
I close my request without having had the answer to my question following a message from a member, he will recognize himself.
I thank the two people who took the time to answer me. It is a community but apparently for some reserved for a certain category of people with a level other than mine.
Stay safe,
you want an explanation on the forum?
OK.
Two people tried to help me and I thanked them.
You, with your habit, you don't answer, a track in the vague or then to read a page of the forum to be made help faster but then, one does not see you any more.
I sent you a message already. I haven't said anything before.
I imagine all the people who are waiting for help and who are reading you.
You may be good, but your pedagogy is not intended for the audience.
If I find the solution, this will be your 121 DAX recipes.
And saying hello never killed anyone.
Have a nice day.
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.
So, you could have a page that displays that presents a slicer of the options you have and then that drives everything else. Or buttons that act as choices to bookmarks.
Difficult to really understand what you are going for here.
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])
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
You can use Same formula in power bi what you have used in Excel . What is the difficulty you are facing please let me know
Regards
Vijay Perepa
Proud to be a Super User!
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |