Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

dmohanty
Valued Contributor

Best Practices to Concatenate Multiple Fact Tables?

Hi All,

I have a scenario where I am calculating 7 Metrics (KPIs) and are stored in 7 Tables/QVDs (Fact tables). My target is to Concatenate all the tables into a Single table to form a Star Schema (I already have my dimension tables).

I want to know in a cleared way, what would be the BEST PRACTICES/ THINGS TO KEEP IN MIND, while concatenating multiple Fact Tables into a single one. (I already have the documents/links shared in community, but still want to know more in my case.) Please help.

For example, I have 3 Metrics as of now in 3 Tables (Fact A, Fact B, Fact C).

Fact A is at Month and Supplier ID level.

Fact B is at Month and Supplier ID level.

Fact C is at Month, Supplier ID an Plant ID level.

(Similarly the other Facts are at some level, which I need to merge.).

In the example scenario, what could be the Best Way to concatenate. What are the things to be taken care of?

N.B: The Dimension Tables I have are: DATE_DIM, SUPPLIER_DIM, PLANT_DIM (and few others).

Tags (2)
6 Replies

Re: Best Practices to Concatenate Multiple Fact Tables?

If you have deceided to concatenate the fact-tables it's really so simple like here:

FactTable:

Load * From a

     concatenate (FactTable)

Load * From b

     concatenate (FactTable)

....

But it could be that other solutions like joining or mapping maybe combined with concatenating led to better (in which way: load-time, ram-ressources, gui-calculations ?) results. Concatenating is the easiest way and aren't there really performance issues it should be enough. If not you will need test some different approaches and examine the log- and mem-files to optimize your app regarding to your likeliest bottle-neck.

- Marcus

dmohanty
Valued Contributor

Re: Best Practices to Concatenate Multiple Fact Tables?

Thank you Marcus for your suggestions.

Looking into the scenario in my case (described above), what could be the possible way to do? I meant do I need to take the Key Fields into consideration? If YES, could you please let me know HOW?

The problem is that, when I am loading the Individual Tables at a time separately with dimensions, I am getting the proper results. Once I am doing a simple concatenate, the association does not happen properly.

For example, For Fact A and Fact B (if loaded separately; one at a time), I am able to filter the metrics by Month and Supplier ID

But once I load both Fact and Fact B (concatenated), the association fails and there is no Month association (or some other dimension association) with the metrics of Fact A.

Could you please help more?

engishfaque
Valued Contributor III

Re: Best Practices to Concatenate Multiple Fact Tables?

Dear DMohanty,

I think you are going to concatenate multiple fact tables.

Kind regards,

Ishfaque Ahmed

Re: Best Practices to Concatenate Multiple Fact Tables?

giakoum
Honored Contributor II

Re: Best Practices to Concatenate Multiple Fact Tables?

This Ahmed is really bad advise

dmohanty
Valued Contributor

Re: Best Practices to Concatenate Multiple Fact Tables?

Hi Ahmed,

What does your reply implies?

Community Browser