Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys, here's my problem :
I have 4 tables :
1-Empresa : The company.
2- AsientoCabecera : The invoice header (which contains the id of the company to which it belongs)
3-CalendarioMaestro : The master calendar ( a classic in QV documents).
4- AsOf2 : A table made to create rolling months of the sales.
What I need to do is to link between "AsOfCalendarIdEmpresa" and "IDEmpresa", I need both fields always have the same value.
By now, to get my desired result with a sale this is "triggering" when you open the document to force "IDEmpresa" to be equal to "AsOfCalendarIDEmpresa". Because I've found no way to link them between the tables avoiding a circular table.
My first idea (and by now, the only one) was to create a field with AsOfMonth&-&IdCompany, but this doesn't work because when I select by real dates, it doesn't match very well.
Is there any better way to do this??
Many thanks in advance!!!
Well you could use set analysis to select the correct AsOfIdEmpressa
AsOfIdEmpresa={$(=only(IdEmpressa)}
But this will work if only onle value is selected for IdEmpressa.
If more thant one, you'll need to generate the possible values in a variable then put this variable in the set analysis:
AsOfIdEmpresa={$(SelectedIdEmpresa)}
Hope this will help you.
Rgds,
Sébastien
Thanks Sebastien for your quick reply.
Well in fact, this is what I've wanted to avoid, it would be nicer to do it with the "associative" logic of Qlikview. Otherwise it would be very tought to force the comparison manually.
Thanks anyway Sebastien!
See you around!
Marcel Olmo wrote:What I need to do is to link between "AsOfCalendarIdEmpresa" and "IDEmpresa", I need both fields always have the same value.
May I ask - why? What's the logic of defining the "As of" rolling months per company? If different companies should have different calendars - would you consider adding "Company ID" as the prefix to all the join keys (qualify Invoice Number, and Date, and any other keys, with the Company Number)? This way, similarly to most ERP systems, all data elements will be differentiated by Company as the first "master" key.