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
santoshransubhe
Regular Visitor

Dynamic Column Name Based on Slicer Selection

Here is the table I'd be working with:

Name StatValue
A         1
B         2
C         3

On the actual report, I'd like to have a slicer with the values "Col1" "Col2" "Col3"
Once selection one of these values, I'd want it to populate the visual table with the correct column name.

For example, if I selected "Col1"

Name Col1
A          1
B          2
C          3

If I selected "Col3"

Name Col3
A          1
B          2
C          3

Note the data does not change and always comes from source column StatValue.

Thanks!

1 ACCEPTED SOLUTION

@santoshransubhe,

 

Simply use a matrix visual, drag Table2[ColumnName] to Columns, measure below to Values.

Measure =
SUM ( Table1[StatValue] )
Community Support Team _ Sam Zha
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

4 REPLIES 4
PattemManohar
Community Champion
Community Champion

@santoshransubhe Please have a look into below posts... might help for the scenario you are after...

 

https://community.powerbi.com/t5/Desktop/Column-Selection-in-matrix-table-visualization/m-p/547264#M...

 

https://community.powerbi.com/t5/Desktop/filtering-fields-to-show/m-p/566713#M267403





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




Thanks. I checked the posts. I already have data in unpivot form. My problem is only with table header column which i want to rename based on slicer value. Any idea how to manipulate the table header using any functions?

@santoshransubhe,

 

Simply use a matrix visual, drag Table2[ColumnName] to Columns, measure below to Values.

Measure =
SUM ( Table1[StatValue] )
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Super User
Super User

I am not aware of a way to do that.


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.