The "Section access" help us at how we should control data access in our applications. Using it you must reduce your data to ensure that the correct people will see the correct dimensions, like displayed in document properties above:
Now, imagine for example, a business with 2 stores, 2 managers and many salesmen disposed as users. Also the Qlikview document must shows data in following requirements:
- The business owner can see the sales in all the business dimensions;
- Each manager can see only the sales at your subordinated salesmen;
- Each salesman can see only your respective sales;
In this example we must reduce the data based in section access, by the way, the correct users saw the correct information.
But if we needs to show the manager sales to the subordinated salesmen?
You may say:
I should use a set analysis expression to show the manager´ sales like this
By doing this, when you open your document as a Salesman profile the both salesman, and Manager´s sales will be the same. And if you not the only salesman linked to the manager something goes wrong. But Why?
The Qlikview document reduces the data to the only view possible at section access, in this case, the salesman´s view.
So what we can do to solve this?
When we need analysis expressions at our document the data reduction will not be the desired behavior. To keep same behavior and data together you may do:
1) Uncheck Data reduction and Strict exclusion options (red) and Check the Initial selection with section access (green) at document properties tab;
2) Go to your section access script and set a HidePreffix character variable, and then set it to preffix your group access section.
3) Go on document properties in the triggers tab and set triggers to block access fields at document open.
4) Save your document, close, and reopen it as salesman profile. You should see the salesman and manager´s data in the right dimensions.