Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikhans
Creator
Creator

resolve synthetic keys

Dear

Please see attached

I want to show in 1 QV document actuals versus budget. Actuals separately works, Budget separately works, Combining Actuals and Budget creates synthetic keys and does not work properly. I have tried to resolve by qualifying. However unqualifying to much leads to the same problem.

unqualifying for example ACCT_NO, results in budget data only up to the month of uploaded actuals.

I need to see reports by (at least) Entity, by ACCT and by Date.

Who can support me?

1 Solution

Accepted Solutions
ahaahaaha
Partner - Master
Partner - Master

I do not represent the content of your data, so I'm very much afraid to steer you on the wrong path. In the attached file, I brought all your data into one file. All comments in the script code. The script itself can only be used as a sample. For example, I joined the source tables Actual and COA with the left link, but I'm not sure if this is correct. Only you from the sense of your data can correctly collect them in one table.

I would be glad if something could help you.

Regards,

Andrey

View solution in original post

14 Replies
awhitfield
Partner - Champion
Partner - Champion

Morning Hans,

you can resolve this my creating a 'composite' key on both your Actuals and Budget tables. There's a worked example on the following post that should help you solve the issue:

how to create composite key

Best regards,

Andy

qlikhans
Creator
Creator
Author

Dear Andrew,

Thank you for your answer. I have tried seveeral options, but have not been fully succesful up to now.

May I ask you to check my (attached) sample files and help me in getting it right?

t.u. in advance

Hans

qlikview979
Specialist
Specialist

Are you expecting to remove syntactic in document.  what is the link column between this table

Anil_Babu_Samineni

From given qvw, Seems there is no Circumference Keys / Synthetic keys

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
qlikview979
Specialist
Specialist

May be

Are Expecting like below  right


PFA

Untitled.png

qlikhans
Creator
Creator
Author

Hi Anil,

t.u. for replying

the issue here is that after trying to resolve the synthetic keys, QV warns for ambigous results.

ahaahaaha
Partner - Master
Partner - Master

Hi,

A pretty decent scheme, if only correctly linked tables (one to one and one to many). When organizing data, I usually try to plan/budget data and actual data in one table with a [budget] or [fact] flag.

Regards,

Andrey

Anonymous
Not applicable

If you are getting synthetic keys it is because the tables have more than one way to reach each other. A table should only every have one foreign key within it; from looking at some of the photos shared, there are multiple columns that have the same name in other tables. One way to fix this is to rename them.

Do you have a sample data file?

qlikhans
Creator
Creator
Author

Dear Mahesh,

similar. In the end my output requirement is to compare the actual with the budget:

for example    

Entity_NOACCT_NOSum(Amnt_ACT)Sum([Month Budget])difference

or   

RepNameCat3Sum(Amnt_ACT)Sum([Month Budget])difference

  or

Entity_NoCC_NAMESum(Amnt_ACT)

the (left,7) positions of ACCT_CC = ACCT_NO. So ACCT_CC is more detailed than ACCT_NO. In your input the connection between ACCT_CC and ACCT_NO appears not to exist.

WOuld establishing that connection be a further step in resolving my issue?

If so, could you help me with that?

t.u. in advance for your help