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
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
v-eqin-msft
Community Support
Community Support

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
v-eqin-msft
Community Support
Community Support

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

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.