Forum Discussion
Filter on the columns
Hi,
I have values in 10 columns
| ID | Value1 | Value2 | Value3 | Value4 | Value5 | Value6 | Value7 | Value8 | Value9 | Value10 | Sum |
| 1 | 10 | 10 | 20 | 0 | 0 | 0 | 100 | 10 | 10 | 0 | 160 |
| 2 | 20 | 10 | 10 | 10 | 0 | 0 | 0 | 10 | 10 | 10 | 80 |
I need to add slicer in which I will multi-select the columns (value1,2,3,.....) and want the sum to be calculated based on the filtered columns. How can I get it done.
Thanks
5 Replies
- amitchandak
Super User
Anonymous , Better you unpivot the table and use the new value column as a filter
- AnonymousNot applicable
Sorry, but I can't use Power Query to unpivot, is there any way to do it through formulaes/calculated columns or tables.
- amitchandak
Super User
Anonymous , for that you have to create an independent table with Value1 value 10 as rows. And then you can get sum. But you will not be able to remove columns,
But if you are in direct query mode, explore if this option can help
https://datamonkeysite.com/2020/10/22/change-dimension-dynamically-using-parameter-in-powerbi/
- V-lianl-msft
Community Support
Hi Anonymous ,
Based on your description and your data model, if you don't use unpivot in power query, It's hard to come up with other solutions to your problem.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.