Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am developing a model in Qlik sense and iv'e been thinking about my fact table.
Basically the fact table should be at the most atomic grain level.
In my model the fact table is my purchase orders, but the purchase orders have header and lines.
Initially i thought about treating both header and lines as a fact table and create a link table, but i am starting to think that this is not the right way to do this, and maybe i need to just join my header and lines into a single table and use that as the fact table and create a normal star schema.
Any thoughts about this? Any better ideas?
Many thanks,
Roi
Hi Roi,
This is really a business question. What you have to think about are four things:
Jordy
Climber
Thank you @dplr-rn and @JordyWegman ,
I am still not sure on the way to go here
the first option was making the PO header as fact
the schema looks as follow:
and if i look on the tables the data is:
In the second option i used Inner join between the PO header and line,
The schema:
the data:
Should i treat the PO lines as a fact table as well? it doesn't seem right as it is an extension of the PO header
and if i join them it looks like it is duplicating lines.
what do you think?
The simplest and maybe most suitable approach could be not to join/map/concatenate the header- and the line-table else just to associate them within the datamodel with the order-id. By a common header/line-datastructure the most calculations and views should work with this logic.
- Marcus