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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
aprilbanana
New Member

DAX to switch value based on selected value

Hello,

 

How do I switch a value in a different column based on the selected value in my dropdown?

For example:

NameResult
Banana0
Grape0
Strawberry 1

Apple

0

 

When i get the average of the result column it'll be 25%. If I choose Banana from my slicer, how do I get it to change the result column to 1?

Results should be: 

NameResult
Banana1
Grape0
Strawberry 1
Apple0

 

New average should bt 50%.

1 REPLY 1
bhanu_gautam
Super User
Super User

Hi @aprilbanana , you can achieve this by using parameters in Power BI

Paramaters can be found under Modelling tab and you can use numeric range and use that in your DAX

bhanu_gautam_1-1707756562579.png

 




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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