To control the access on certain data to certain users you could use Section Access. I'm not sure how to implement it in your particular case of two fields linked per another field because my scenarios are a bit different. In general it should be possible but you might need a few trials to find the right solution.
A bit more simpler could the section access be if you changed a bit your datamodel. I could imagine that a concatenation of part_id, quantity and stock country (as country) to the sales table would bypass the problem with two different country-fields. This meant you would get a single fact-table and the other fields from the stock table could be loaded (distinct) as a dimension-table.
Would suggest to link the countries to the part_id:
LOAD DISTINCT part_id, UPPER(stock_country) AS Country RESIDENT Stocks;
CONCATENATE LOAD DISTINCT part_id, UPPER(sales_country) AS Country RESIDENT Sales;
and then place your security on the field Country,
i.e. a person being able to see a certain country would be allowed to see all part_id's, be it in stock in this country or being sold there.
Hi Marcus, Hi Peter
Many thanks for your replies, you were life-savers
Went with Peter's suggestion and created a AccessTable with part_id + country. Works 99.99% ok. Only unexpected side-effect for me is that Qlikview does a OR in Sales and Stock Country, so a user having access to France only, can still see stock existing in the UK if that part_id has been used in a French Sales Order.
Fortunately, these cases are rare and this behavior actually improves the synergy between Sales and Logistics so will be seen as a plus.
If this ever becomes an issue, think there's a "nuclear" option to sever the part_id link between Stock and Sales.
Users would have to check Sales and Stock data separately, which would be a loss of functionality but...
In the long-run Marcus suggestion would be the ideal - changing the data-model, but not possible to implement due to time constraints (may be for a future v2.0 dashboard...)
P.S. All-in-all these problems what you get when trying to quickly re-ash an old dashboard that was used in the UK only, to be used in all of Europe -- there's just not such a thing as a free lunch
Again a big thank you to both!