Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
amijit_hazarika
Contributor III
Contributor III

Issue with Datamodel

Hi Qlik Enthusiast,

I am building a datamodel and getting stuck with bringing the right data and removing synthetic keys.

I have 2 files(File A and File B) and I have created facts and dimensions out of these 2 files.

Fact has Emp Id, Enitity Id, Revenue etc and Dim has Entity Name, Geography, Function etc.

When I join these with the help of Emp Id, I don't get correct output for Entity Name.

When I join with Entity Id then I get correct data for Entity Name but not the right Employee Id gets picked up.

For testing, I joined with Emp ID and Entity ID, I am getting the right output but this leads to synthetic table.

Solution or any advice would be highly appreciated.

Thanks in Advance.

1 Solution

Accepted Solutions
YoussefBelloum
Champion
Champion

Hi,

on both tables, you should create a composite key, like this:

Autonumber([Emp ID]&[Entity ID]) as Key


and remove [Emp ID] and [Entity ID] fields from your tables


PS: you can create composite key without functions like Autonumber(), like this: [Emp ID]&[Entity ID] as Key

it is a matter of optimization


View solution in original post

7 Replies
isingh30
Specialist
Specialist

Can you share your data or sample application?

Thanks

YoussefBelloum
Champion
Champion

Hi,

on both tables, you should create a composite key, like this:

Autonumber([Emp ID]&[Entity ID]) as Key


and remove [Emp ID] and [Entity ID] fields from your tables


PS: you can create composite key without functions like Autonumber(), like this: [Emp ID]&[Entity ID] as Key

it is a matter of optimization


amijit_hazarika
Contributor III
Contributor III
Author

Hi,

Which one would you suggest? Autonumber or Autonumberhash128?

Thanks

YoussefBelloum
Champion
Champion

it depends on the amount of data you load.. and on other things that I ignore.. on a small/medium set of data I put whatever comes in mind. when it comes to heavy datasets, I automatically do some benchmarking

uroboros
Creator
Creator

Hi @

amijit_hazarika
Contributor III
Contributor III
Author

Thanks Youssef!

This worked.

Cheers (y)

YoussefBelloum
Champion
Champion

you're welcome, good luck