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

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.

Reply
Chanleakna123
Post Prodigy
Post Prodigy

What if Parameter - Playing with %Mix Column

Hi all , 

I'm trying to create "what if Parameter" with %Mix change , Meaning if i change the %Mix in the Parameter as shown in the column , the data will tell me how the UC and NSR will be impacted , I belive there must be some math there, Though i have no idea how acheive this ?

what i want is , the Audience can play with the Parameter to see how their NSR and Volume UC impact if the %Mix chaged by up or down , Also the %Mix will be only equal to 100% , If these 2 more than 100% , we may need to block it. 
i belive the What if Parametor will have 2 parameter there Juice and Milk. 

Can anyone help me to acheive this ?  data.PNG

4 REPLIES 4
Chanleakna123
Post Prodigy
Post Prodigy

@v-yanjiang-msft , hey , you're so brilliant , you just meet my expextation right now. 
Though , can i change my purpose a little bit , Now i would like the audience to play with the UC and NSR Parameter on Mix , Meaning they will adjust the Mix by each Name , Juice and Milk , 
now we don't wanna block a 100% Anymore. 
May i know how ? i think we are on the right track right now. 
🙂 

they will play with the mix , 
i have around 10 Categories , so , i would like them to play with all the mix , And then if all mix exceed 100% , we will use the card visualization to aleart them . but the purpose is to give them play with the mix. 

Hi @Chanleakna123 ,

Could you show the expected result like in the original post?

Best Regards,
Community Support Team _ kalyj

v-yanjiang-msft
Community Support
Community Support

Hi @Chanleakna123 ,

According to your description, here's my solution.

1. Create two parameters.

vkalyjmsft_0-1648806808737.png

vkalyjmsft_1-1648806871733.png

2.Create four measures.

UC % Mix =
IF (
    ISINSCOPE ( 'Table'[Name] ),
    SWITCH (
        MAX ( 'Table'[Name] ),
        "Juice", 'UC Parameter'[UC Parameter Value],
        "Milk", 1 - 'UC Parameter'[UC Parameter Value],
        1
    ),
    1
)
UC = 5.45*'Table'[UC % Mix]
NSR % Mix =
IF (
    ISINSCOPE ( 'Table'[Name] ),
    SWITCH (
        MAX ( 'Table'[Name] ),
        "Juice", 'NSR Parameter'[NSR Parameter Value],
        "Milk", 1 - 'NSR Parameter'[NSR Parameter Value],
        1
    ),
    1
)
NSR = 30.6*'Table'[NSR % Mix]

Select the desired value in parameter, get the correct result.

vkalyjmsft_3-1648807072419.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.