Forum Discussion
Understanding Relationships
- 8 years ago
Hi Arcturus
My first thought would be to go for
- Sales table that contains a unique id, a sales date, an amount, a product id, and a location id,
- Product table that contains a product id and a description
- Location table that contains a location id and a description
Then create the following relations
- Sales product id to Product product id (Many to one)
- Sales location id to Location location id (Many to one)
That should get you going, and then later you can flesh it out, maybe by adding a region to your Location table, or adding a new Salesperson table and a salesperson id to the Sales table.
Hope this helps,
Chris
- 8 years ago
If you want a date table then you should have a single row per date. The error suggests that the date table has duplicate dates.
If I'm understanding your predicament correctly, just create a date table and relate the date to each of the dates in the other two fact tables. That takes care of the date filtering.
You can also create lookup tables for geography and for product (and relate them to each corresponding fact table), and use theses to filter in slicers, matrices and visuals in general.
Thanks PaulDBrown,
I might very well be doing it wrong, though when I try to create a relationship between my Date table (which only comprises a Date column) and the Date columns from my other Queries, I get the following error message:
You can't create a relationship between these two columns because one of the columns must have unique values.
What am I missing?
- Chris998 years agoAdvocate III
If you want a date table then you should have a single row per date. The error suggests that the date table has duplicate dates.