Using slicer on several data sources (power query) with non-unique values?

hansi262

New Member
Joined
Apr 30, 2021
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
Hello,


maybe somebody could help me. I would like to have several slicer on several data sources (power query) where the data sources do not have unique values?

Example:
2 data sources in power query
query a: list of production orders
query b: list of sales orders
both have the columns plant name, the customer name and the date in common.
I generated 2 pivots, one for production orders, one for sales orders

Now I would like to have a slicer, filtering both pivots automatically for the plant and for the date. Both data sources have 1000 lines, with several sales and production orders per plant and per date.

There are some tutorials on the net, to use the "relationship" button (Excel 2016), which does not work, as in both data set, the column plant is not unique.

My current workaround is, to have a master data table with one row per plant in power query and a hidden pivot, called plant, that just lists all plant names. I use that one to make 2 relationships with both queries, production and sales orders and then make a slicer on the plant pivot. It seems to work, but sounds a bit cumbersome. Is there a better way, to directly us a slicer on 2 data sources with multiple entries or do I really need to include this artificial step? see screenshot.

thanks for advice,
Michael
 

Attachments

  • image001_small.jpg
    image001_small.jpg
    61.9 KB · Views: 48

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
my sense is that you're confusing the behaviour of a Slicer with that of linked tables. Linked tables cannot directly handle many-to-many relationships. To do so create a table of the unique values, then link each table to that unique table - you'll have a many to one relationship on each side. Then create a measure that simply names the other table, so to sum values in the sales table based on a field in the Production table: Calculate(SUM(qrySales[Values]), qryProduction). I don't really know how it works, but its worked for me.

To allow a single slicer to operate on both tables, simply right click the slicer and select the 'connections' option (I think that's right - it sits somewhere in middle of the context menu) and you can then click on the tables that the Slicer operates on.

HTH
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,183
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top