the right grain of a fact table in data warehouse

20 views Asked by At

we are creating star schema in our new data warehouse which will be use in Tableau as our main BI tool.

we have order,product,supplier,plant,price.demands per yearand year of demands.

So if we create a fact table of the grain of year of demands then you have for example you will have maybe just one row for one order with one product , one supplier , one plant with one year of demands and a price for that product. If you have more than 1 year of demands like year 2023 has demands of 10 pieces and year 2024 of 20 pieces. Then you have 2 rows in the fact table. Imagine you want to visualize it in Tableau. With all that fields it will be fine but because there are 2 rows of data then if using just order,product,supplier and price then the price will be summed up which be incorrect. If there are many years of demands then it will be worse.

How to design the fact table?

0

There are 0 answers