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
dmmanchon
Helper I
Helper I

Dynamic field to display in a visualization

Good, the query is as follows:
How I can use the same/single chart to display different columns/metrics in a table dynamically/selectively.
For example if I have a table like this:
NumberSpeedDistanceTime
Álvaro5158
Jorge4184
Raúl2145
Lor that I'm looking for if I have a line chart with the speed value for each name, which I can dynamically change so that I happen to show the distance or time on the chart instead of the speed.
Greetings.
2 ACCEPTED SOLUTIONS
parry2k
Super User
Super User

@dmmanchon unpivot your table and it will be easy, to do so,

 

- transform data

- select number column

- right-click and select unpivot other columns

 

you will get attribute and value, you can rename these columns if you want. close and apply

 

- add a slicer with attribute column on it

 

on your visual, put number and value, and based on slicer value selected the value will change.

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

v-lili6-msft
Community Support
Community Support

hi  @dmmanchon 

For your case, you could try one of three ways to get it.

1. Selected [Speed], [Distance], [Time] then unpivot them in power query, then use new "attribute" field as a slicer.

This way is simple but it will change table structure

 

2. use three bookmark as miguel said.

 

3. Create a Dynamic measure as this blog:

Dynamically change the information within a visual via a slicer

 

Regards,

Lin

Community Support Team _ Lin
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

3 REPLIES 3
v-lili6-msft
Community Support
Community Support

hi  @dmmanchon 

For your case, you could try one of three ways to get it.

1. Selected [Speed], [Distance], [Time] then unpivot them in power query, then use new "attribute" field as a slicer.

This way is simple but it will change table structure

 

2. use three bookmark as miguel said.

 

3. Create a Dynamic measure as this blog:

Dynamically change the information within a visual via a slicer

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
miguel
Community Admin
Community Admin

Hello!

You can right-click your "Name" column and use the "Override dynamization of other columns" / "Unpivot Other Columns" option and shape your table so you can use a selector as you want.

Otherwise I recommend you to use the bookmarks as shown here:

https://docs.microsoft.com/es-es/power-bi/desktop-bookmarks

parry2k
Super User
Super User

@dmmanchon unpivot your table and it will be easy, to do so,

 

- transform data

- select number column

- right-click and select unpivot other columns

 

you will get attribute and value, you can rename these columns if you want. close and apply

 

- add a slicer with attribute column on it

 

on your visual, put number and value, and based on slicer value selected the value will change.

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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.