Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Circular references

Hello, qlik community!

Help my to solve my problem with the keys.

I've got a model (just a sample)

[Item.ledger]: loc.key, sales, costs, cal.key, ....

[location]: loc.key, loc.city, loc.name, ...

[Calendar]: cal.key, date, year, month, year&month...

[Budget]: budget_amount, loc.city, year&month.

I need a bar chart with the dimension of months and measures costs, sales, budget amount. And the 2nd chart with the dimension city and the same measures. I have got a circular refences with location city and year&month.

If I try to concatenate function (concatenate (item.ledger) load * from budget, I have 4 syntetics keys and it no working nothing. My sales, costs and budget amount are zero. If I connect budget to the city, diagram with the dimension of month is not working.

How to solve my problem? Any idieas?

4 Replies
robert_mika
Master III
Master III

Could you add your real(excel,csv,text) data and/or screenshot from table viewer?

ogster1974
Partner - Master II
Partner - Master II

‌my thought is budget sales and costs should be in a single fact table something like

ledger:

%itemkey, type, %lockey, %calkey, sales, costs,budget

TYpe identifying the ledger item as either a sale, cost orbudget value.

LInk to your calendar and location dimensions using the same key and Your model should work better.

HOpe this helps

REgards

Andy

sasiparupudi1
Master III
Master III

Try like this

[Item.ledger]:

load * inline

[loc.key, sales, costs, cal.key

];

[location]: load loc.key, loc.city as LocationCity, loc.name inline

[loc.key, loc.city, loc.name

];

[Calendar]:load * inline

[ cal.key, date, year, month, yearandmonth];

[Budget]:

load

budget_amount, loc.city, yearandmonth, loc.city as budgetCity inline

[

budget_amount, loc.city, yearandmonth

];

qlikviewwizard
Master II
Master II

Hi Laura,

Please attach the sample application. Thanks.