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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Analitika
Post Prodigy
Post Prodigy

Change column name if filter is changed value in Power BI

Hello,

 

I would like to ask how to make that if user selects filter value, then changes visual table column name. For example, filter contains price/unit selection, if user selects filter value price, then visual column name is price, if selects unit, then colum name is unit? How to achieve this in Power BI?

1 ACCEPTED SOLUTION
isabella
Microsoft Employee
Microsoft Employee

Hi @Analitika 

I did a local test,hope it will help you.

Here is my test table

isabella_0-1653034341723.png

 

 

Then I create 2 measures

saleprice measure = SUM([salesprice])

salevolumn measure = SUM([salesvolumn])

 

 

then I create a table for choose the measure

isabella_1-1653034341724.png

 

Create a slicer

isabella_2-1653034341725.png

 

 

Then I create the most important measure ,use this measure you can change the value  by slicer

Measure 2 = SWITCH(TRUE(),SELECTEDVALUE('slicer for measure type'[type],"no option")="price",[saleprice measure],SELECTEDVALUE('slicer for measure type'[type],"no option")="volumn",[salevolumn measure],[saleprice measure])

 

When I select the price on the slicer ,this measure will show [saleprice measure],when I select volumn it will show [saleprice measure]and when no one selectedI will let it show [saleprice measure]

isabella_3-1653034341726.png

 

 

 

 

isabella_4-1653034341727.png

 

Best Regards,

Community Support Team _Isabella

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
isabella
Microsoft Employee
Microsoft Employee

Hi @Analitika 

I did a local test,hope it will help you.

Here is my test table

isabella_0-1653034341723.png

 

 

Then I create 2 measures

saleprice measure = SUM([salesprice])

salevolumn measure = SUM([salesvolumn])

 

 

then I create a table for choose the measure

isabella_1-1653034341724.png

 

Create a slicer

isabella_2-1653034341725.png

 

 

Then I create the most important measure ,use this measure you can change the value  by slicer

Measure 2 = SWITCH(TRUE(),SELECTEDVALUE('slicer for measure type'[type],"no option")="price",[saleprice measure],SELECTEDVALUE('slicer for measure type'[type],"no option")="volumn",[salevolumn measure],[saleprice measure])

 

When I select the price on the slicer ,this measure will show [saleprice measure],when I select volumn it will show [saleprice measure]and when no one selectedI will let it show [saleprice measure]

isabella_3-1653034341726.png

 

 

 

 

isabella_4-1653034341727.png

 

Best Regards,

Community Support Team _Isabella

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Arul
Super User
Super User

@Analitika ,

Please check this thread if it is solves your problem or not.

https://community.powerbi.com/t5/Desktop/Create-table-from-measure-for-visual/m-p/2501880#M889608 

Thanks,

Arul





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

Proud to be a Super User!


LinkedIn


Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors