Discussion Board for collaboration on QlikView Scripting.
I have a QVW with financial data from 3 companies.
Now I have to find a way to do Intercompany Elimination.
(what means that if I select 2 companies together, the invoices they made to eachother should not be show.)
I tried to make this with buttons, which works fine.
The problem is that there will be 15 different companies in the same QVW, which makes for a lot of buttons.
So, I would like to try the same thing as the button, but with Field Event Triggers.
I'm working for the first time with the Field Event Triggers.
Is there a possibilty you could set a trigger after a specific selection in a field?
Because now, I put an Event trigger on the field "company" but as soon as I click on one of those companies, the trigger is activated.
And you can't select an individual company anymore.
I would only want the trigger to activate on a specific selection in the field "company'.
Does anyone know if this is possible?
And how to do this?
Go to Solution.
I would attempt to solve this at the script level.
It seems as if you know exactly what Key_IC values need to be excluded. If you really know this, then I would build a flag function in the script marks your intercompany values with a flag:
if(Key_IC='VIT68199',1,if(Key_IC='VIT28187',1,if(Key_IC='SNS32021',1,if(Key_IC='SNS54026',1,0)))) as Flag_Intercompany_Key_IC
and so on and so forth for your other values ...
Of course you can use different flags than 1 and 0, but that's up to you.
You would only need a trigger that reacts on a selection in Company and selects your '0' in your flag field.
there's no such possibility in the triggers.
But an elegant solution is probably out there, we'll just need more information on your specific problem.
How do you buttons work exactly? Do you have a flag for intercompany transactions or anything similar?
Elimininating those transactions with a flag seems like a natural way of getting rid of those numbers you don't want in your QVW (if that's what you want to do).
I have 3 companies: VIT, SNS & NUSC
Now the button does the following:
Select in Field: Company (VIT|SNS)
Select in Field: Key_IC (VIT68199|VIT28187|SNS32021|SNS54026)
Select Excluded: Key_IC
I have a second button for the companies (VIT|NUSC), with other Key_IC values.
The key_IC value is build with the company name & the customer/supplier number of the other company.
For example: In company VIT, the supplier number for supplier SNS is 68199. This gives VIT68199
In company SNS, the customer number for customer VIT is 54026. This gives SNS28187.
Hope this gives enough information.