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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Kolumam
Post Prodigy
Post Prodigy

Changing column value based on slicer

I have 4 calculate columns and I want the value of the column to be changed based on a button/slicer. Is it possible? Please note the bookmark solution requires me to create 4 more calculated columns and I don't think the method is correct.

Capture.PNG

 How to replace the values for a specific row when a button is clicked?

4 REPLIES 4
amitchandak
Super User
Super User

@Kolumam , You want to change the column or row value?

 

For column try measure slicer approch

 

measure slicer
https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slic...
https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/50...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak 

 

I created the column with the help of Power Query. 

So Year 1 column = some column x some column.

 

Now the issue is that I need to override the above column value for a row with the help of a button. Any idea as to how I can do this?

Hi @Kolumam ,

 

Do you want to create a column slicer and when select one column, then display the column?

For example, when you select Year 1 column, then the table visual will show Year 1 column.

If yes, we can create a table and a measure to meet your requirement.

 

1. Create a table contains column name using Enter Data.

 

changing1.jpg

 

2. Then create a measure to display the value.

 

Measure = 
var _select = SELECTEDVALUE('Table (2)'[Column1])
return
SWITCH(
    TRUE(),
    _select="Year 1",SUM('Table'[Year 1]),
    _select="Year 2",SUM('Table'[Year 2]),
    _select="Year 3",SUM('Table'[Year 3]))

 

changing2.jpg

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

 

Best regards,

 

Community Support Team _ zhenbw

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

 

BTW, pbix as attached.

Hi @Kolumam ,

 

How about the result after you follow the suggestions mentioned in my original post?

Could you please provide more details or expected result about it If it doesn't meet your requirement?

If you've fixed the issue on your own please kindly share your solution. If the above posts help, please kindly mark it as a solution to help others find it more quickly.

 

Best regards,

 

Community Support Team _ zhenbw

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.