Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Ankit3
Contributor II
Contributor II

How to set default value in filter corresponding to the user who is viewing the dashboard ?

Hi All,

I needed to check if there is any way to set default value in filter for the user who is viewing the dashboard.

We have Area, Region & Territory filter and user access is provided to users corresponding to their locations.

Issue: When user logs in, he gets the values on screen as ''All" in the territory filter and not his own.

We need to make this default for each user in other words any value other than "All". Any ideas / workaround would be appreciated.

Thanks!

Labels (1)
8 Replies
Or
MVP
MVP

You could create a trigger (QV) or default bookmark (QS) with the appropriate selection, e.g.

Area=Only(DefaultArea)

Where DefaultArea is the field that determines what the user's default should be.

Ankit3
Contributor II
Contributor II
Author

Can you please describe this in few more words. I mean the steps needed to achieve this.

Ankit3
Contributor II
Contributor II
Author

Already we have applied the section access and people are able to see the corresponding values to their territory.

But,

my requirement is to keep the territory name as default in the filter.

Ankit3
Contributor II
Contributor II
Author

I do not want to create a landing page. 

When user logs in, he gets the values on screen as ''All" in the territory filter and not his own.

We need to make this default for each user in other words any value other than "All". 

E_Røse
Creator II
Creator II

Add a table to your model with current_user, territory

where you list all the users and their default territory. This table must be connected to the model with the territory-field. Then create a bookmark with

{$<current_user={'$(osuser())'}>}

add sheet action choosing this bookmark using e.g. sheet actions .

This will select the current user, but show the relevant values. If you want to choose the territory instead, that could probably be achieved using the P()-function  in your expression somehow.

(in an earlier version of qliksense enterprise I was able to create bokkmarks like that  after searching for osuser() in the selection box'es. I am not able to reproduce that now. So instead of a bookmark, you might have to apply the selection using sheet other than apply bookmark. I recomned that you also lock the field after the selection is made.)

 

Please like and mark my answer as a solution, if it resolved your issue.

Ankit3
Contributor II
Contributor II
Author

Hi Elin,

Already our table mapping is done in the data model. I would like you to know that the territory filter is getting the relevant values against the region but the default value of filter is set to 'All" . I just need any other value in territory filter other than "All"

E_Røse
Creator II
Creator II

I am not sure I understand? They only see one territory, and you want that to be selected?
Then you can use sheet actions to select possible in the territory field, before locking the selection.