cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Post Prodigy

## Store the parameters selected for each customer

Hi, i have an equation as below to calculate the score of each customer.

w1, w2 and w3 are the weights for each factors.

Users wish to select different weights for each customer.

How to store the different weights for each customer once they have selected and calculate the overall score?

`Score = (w1 * emergency orders%) + (w2 * failed orders%) + (w3 * down orders%)`

5 REPLIES 5
Community Support

Hi @PBI_newuser ,

You need to use SWITCH function in your measure:

``Score = SWITCH(SELECTEDVALUE(Table[Customer]),"Customer1",(w1 * [emergency orders%]) + (w2 * [failed orders%]) + (w3 * [down orders%]),"Customer2",(w4 * [emergency orders%]) + (w5 * [failed orders%]) + (w6 * [down orders%])......)``

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,

Dedmon Dai

Post Prodigy

How if there are over 100 of customers and we do not know which one they have selected after we publish to Power BI service?

Community Support

Hi @PBI_newuser ,

In the dax measure, the selectedvalue function would confirm which one they have selected. If I misunderstand your reuqirement, please explain more.

Best Regards,

Dedmon Dai

Post Prodigy

Hi @v-deddai1-msft , for example user select Account = A and the respective weights first, then click a button to store this information before proceed to the second selection (Account =B). Is it possible to store the selected slicers multiple times?

1. Account= A; w1=2; w2=4; w3=1
2. Account= B; w1=7; w2=2; w3=4
3. Account= C; w1=1; w2=3; w3=2
4. Account= D; w1=5; w2=2; w3=3

Community Support

Hi @PBI_newuser ,

What did you mean store the selected slicers?

Best Regards,

Dedmon Dai

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.