Create slicer for multiple columns

Occasional Contributor

Is it possible to create a slicer which looks at multiple columns? I have a table (Normal table, this cannot be a pivot table) which includes suppliers, and then order days in columns split by weekday (see attached example). I would like one slicer which can filter this table on each day of the week, but I can't work out how to do it. Or if this is not possible, is there a way I could combine this data so that it could work with a single slicer?

 

Note: this needs to be programmable as I'm building this into a macro

 

Thanks for your help!

3 Replies

@Rachel1994 I suppose you have to flatten the data so that you have the weekdays in one column. Did that quickly with Power Query in the attached file.

Riny_van_Eekelen_0-1660128751695.png

 

Thanks a lot for your response. I have not used power query before so it is interesting to see it's use. I created a macro to do something similar with all the days in one column.

Unfortunately, I can't have duplicate lines for each supplier in the main table because it contains for example order quantities, which I do not want to be duplicated. So I need the filter to be applied to the original table. Do you have any ideas? Or perhaps this is not possible

@Rachel1994 Not much is impossible with Excel. But I don't really understand why can't you use pivot tables, provided you structure the data correctly. That for you to decide, of course. But data how you have it now is difficult to analyze. That's why I used PQ to improve on that.

 

And I don't understand either why having duplicate supplier codes in a tabular transactions table would cause a problem. It's not very difficult to determine that you had 8 transaction this week with 6 distinct suppliers.

 

But having said all that, you mentioned to be working on a larger macro driven project (programmable). Since I'm not a big fan of macro's, I perhaps don't really understand what you are trying to achieve an why you insist on using macro's.