Forum Discussion
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.
How to replace the values for a specific row when a button is clicked?
4 Replies
- amitchandakSuper 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-slicer-parameter-table-pattern
https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/500115- KolumamPost Prodigy
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?
- v-zhenbw-msftCommunity Support
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.
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]))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.