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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Change values on visuals using a list/dropdown

Hi,

 

I'm relatively new to PowerBI but have been searching the forums and other websites for an answer but nothing seems to work. 

 

I have built a report which contains several different visuals including a treemap, funnel and world map. I would like to include a list or dropdown selection where someone can change the values in a visual. For example, on the world map, I am currently overlaying the value of several companies an asset manager owns. I would like to include a box whereby instead of valuations the user can select say "Revenue" as the Size measure. 

 

I have seen previous posts which refer to creating a new unrelated table with one column and the measures you want to "select" as rows. I have done this but then can't seem to get a SELECTVALUE or HASONEVALUE DAX expression to work. Are there any other ways?

 

Thanks

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

Hmmm, yes you should be able to create a disconnected table. Has to not be connected to anything else, no relationships. It might be called 'MyDisconnectedTable' and have an Item column with values of 

 

bunny

fluffy

poo

 

You should then be able to write a measure like this:

 

Measure =

  VAR __selected = SELECTEDVALUE('MyDisconnectedTable'[Item])

RETURN

  SWITCH(__selected,

    "bunny",SUM('Table'[Commission]),

   "fluffy",SUM('Table'[Revenue]),

   "poo",SUM('Table'[Cost]),

   BLANK()

  )

 

Not sure why you would not be able to get HASONEVALUE or SELECTEDVALUE to work. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

If you need additional examples:  https://community.powerbi.com/t5/Community-Blog/Solving-Attendance-with-the-Disconnected-Table-Trick...



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

HI @Anonymous,

Please share some sample data to help us clarify your data structure, formulas and relationship mapping, it will help for test and fix your formulas.

Regards,

Xiaoxin Sheng

Greg_Deckler
Community Champion
Community Champion

Hmmm, yes you should be able to create a disconnected table. Has to not be connected to anything else, no relationships. It might be called 'MyDisconnectedTable' and have an Item column with values of 

 

bunny

fluffy

poo

 

You should then be able to write a measure like this:

 

Measure =

  VAR __selected = SELECTEDVALUE('MyDisconnectedTable'[Item])

RETURN

  SWITCH(__selected,

    "bunny",SUM('Table'[Commission]),

   "fluffy",SUM('Table'[Revenue]),

   "poo",SUM('Table'[Cost]),

   BLANK()

  )

 

Not sure why you would not be able to get HASONEVALUE or SELECTEDVALUE to work. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

If you need additional examples:  https://community.powerbi.com/t5/Community-Blog/Solving-Attendance-with-the-Disconnected-Table-Trick...



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors