Forum Discussion
Can't Relate Two Tables (Pictures Included)
I'm trying to relate two tables: one containing a list of all jobs released for a maintenance company, and another showing stock levels. Not all job categories relate to stock levels, but some relate to more than one. I was wondering if there was a way for the job category to be selected on one graph, and it highlights all possible stock on another.
The large database with all entries on - relevant columns are maintenance category and maintenance item.The stock table, with all stock items under 'stock item'The circle area is what i want to become highlighted when 'white goods' is selected on the graph on the right.
Thanks in advance!
Dan
6 Replies
- AnonymousNot applicable
Hi danielc7150, when creating a relationship, one of the columns needs to be a list of distinct values. In this example, the values for Maintenance Item reports multiple times on each table.
I would create a separate table that has the distinct list of maintenance categories. Then, connect this table to the 2 tables below. Use the Maintentance Category column from your new table in your charts, and you should be able to filter as desired.
- danielc7150Frequent Visitor
Thanks for the reply Anonymous.
Tried this, and it doesn't let me link the two tables, claiming that one still needs to have unique values.
Here is the new table that I added:
The number column is there because at first I thought it may have been rejecting it for it being a 1-column table.
Any ideas?
Dan
- mattbriceSolution Sage
like Anonymous says, you can't have columns on both sides of the relationship with duplicate values. In your list, you could link to the Number column because they are all unique. But can't use Maintenance Category on "1" side of relationship as it has repeated items "White Goods", "Inventory Items"