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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
finch
New Member

Different calculations based on selection

Hello, could you please advise me how to perform below calculation?

 

I want to select particular value from "Grupa" table and show "Zmienna" in table on the left. 
In below example it would be 0 for all rows and 1.11 for "Wyjazd". 

 

 

finch_2-1638903029042.png
Then I will perform multiplication of this "Zmienna" and value shown by measure in this table, but it should be easy if I overcome above issue.

Paweł  

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @finch ,

 

Please follow steps below.

1. Create a table for slicer:

Grupa(for slicer) = VALUES('Table'[Grupa]) 

Eyelyn9_0-1639119095066.png

2. Add a what-if parameter:

Eyelyn9_1-1639119184532.png

3. Create a measure:

Measure = IF(MAX('Table'[Grupa])=SELECTEDVALUE('Grupa(for slicer)'[Grupa]),[Parameter Value],0)

Output:

Eyelyn9_2-1639119232613.png

Eyelyn9_3-1639119245649.png

 

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @finch ,

 

Please follow steps below.

1. Create a table for slicer:

Grupa(for slicer) = VALUES('Table'[Grupa]) 

Eyelyn9_0-1639119095066.png

2. Add a what-if parameter:

Eyelyn9_1-1639119184532.png

3. Create a measure:

Measure = IF(MAX('Table'[Grupa])=SELECTEDVALUE('Grupa(for slicer)'[Grupa]),[Parameter Value],0)

Output:

Eyelyn9_2-1639119232613.png

Eyelyn9_3-1639119245649.png

 

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

amitchandak
Super User
Super User

@finch , based on the column name

 

if(selectedvalues([Grupa]) = max(Table[Grupa]), [Wyjazd measure], 0) +0

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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