Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
PBI_newuser
Post Prodigy
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
v-deddai1-msft
Community Support
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

Hi @v-deddai1-msft ,

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?

 

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

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

 

Hi @PBI_newuser ,

 

What did you mean store the selected slicers?

 

Best Regards,

Dedmon Dai

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.