Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

luizcdepaula
Contributor II

If condition on a dimension

Hello experts,

I am new to Qlik Sense and I am having many challenges. One of them is to restrict the set of values without having to use a measure.

For example, I have a table with Cities and many measures that follow based on the city, like sales, budget, and so forth.

Each sales person is responsible for a set of cities, so they need to have dashboards and reports customized for them, just with their cities showing on their table, without having to select from the filter.

I can use set analysis on each measure (calculation) and define the set of cities per measure, but it is a lot of work. So, I was wondering if I could define the amount of values from a dimension, and all the measures will follow the selection.

I was trying to use something like:

if(isnull(getfieldselections([City])),[City]='Chicago',[City])

or

if(Getselectedcount([City])=0,[City]='Chicago',[City])

But the statements above return no values. What am I missing?

Thanks for the help in advance.

1 Solution

Accepted Solutions
MVP
MVP

Re: If condition on a dimension

Maybe like

if(Getselectedcount([City])=0, if([City]='Chicago',[City]),[City])

2 Replies
MVP
MVP

Re: If condition on a dimension

Maybe like

if(Getselectedcount([City])=0, if([City]='Chicago',[City]),[City])

luizcdepaula
Contributor II

Re: If condition on a dimension

Thanks Swuehl,

It works perfectly. I was not using another IF statement to pull the individual values from the specified field.

It worked