Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
luizcdepaula
Creator III
Creator III

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
swuehl
MVP
MVP

Maybe like

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

View solution in original post

2 Replies
swuehl
MVP
MVP

Maybe like

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

luizcdepaula
Creator III
Creator III
Author

Thanks Swuehl,

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

It worked