Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
stinton52
Contributor
Contributor

Aggregation result 0 when field does not exist

Hey everyone,

I am building an app with qlik sense and i have a premissions system that's using qlik's Section Access capbility. using section access i am hiding fields from users based on their premissions.

everything is great, except for when a user without a premission for a specific field sees a visualisation using that field (lets say a KPI that shows a sum), it shows 0, instead of an error or "-".

this is a problem to me, if a user does not have premissions to see a specific field i want to reflect that, and not show a false aggregation that maybe incorrect. I would like to show an error for that visualisation or just a blank value.


using a show condition for every visualisation might not work for me because i have many visualisations and some use multipule fields while a user might have access to only a few of them.

does anyone know or have any idea for how this can be solved? thank you very much.

Labels (3)
2 Replies
MayilVahanan

Hi

Might be, you can use if condition, to fix it, like

if(Sum(Sales) = 0, '-', Sum(Sales)) 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
marcus_sommer

It might not return your expected results but IMO it are not mandatory false aggregations. If everything else worked within your application I could imagine to keep it like that and adding a few visual hints - within the object-titles, comments, backgrounds and similar places - that zero might not be the result of multiple values else also by missing any values (which may not mandatory the result of the section access reduction else also if no fact-data exists). Those hints mustn't be static else might be also dynamic in regard to the user.

Regarding to the suggestion from @MayilVahanan a slight variance to enforce a NULL result might be to multiply with it - this means something like: 

sum(Sales) * if(condition, null(), 1)

whereby condition relates to your user-permissions (it might be helpful to load the permissions a second time directly within the data-model to grab the relevant information from there) and which might be outsourced in one or several variables.