Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filter dimension for charts

Hi,

I want to make a bar chart that displays the situation at a few key customers of interrest (hard coded) regardless of which locations that are chosen in the list boxes (this for attracting user's focus to what is defined as organization focus area).

I'm new to Qlikview, but I think I have to create a calculated dimension. P.t. it has following syntax:

if(Customer = 'AAAA' or Customer = 'BBBB' or Customer = 'CCCC', Customer, Null()).

When I use this and suppress nulls, I almost get what I want. But if I choose a customer in a list box, it filters on that as well. How can I avoid that for this spesific chart? Can I utilize set analysis for this context to make sure it filters from all customers {1}?

Regards,

Tom Arne Sivertsen

1 Solution

Accepted Solutions
Not applicable
Author

Thanks! When I combine the suggestions, the expression sum( {<Customer= {'A','B'} >} Sales ), and no calculated dimension, seems to give me my preferred result. Ref solution chart in attached document.

It reflects the date/month selections in the listbox, but displays always customers A and B, and not C, in the chart regardless of selections in Customer list box. Sorry for beeing inaccurate in my descriptions.

Regards,

Tom Arne Sivertsen

View solution in original post

10 Replies
Nicole-Smith

In the bar chart where you have this dimension:

if(Customer = 'AAAA' or Customer = 'BBBB' or Customer = 'CCCC', Customer, Null())

you would use the {1} in your set analysis in your expression(s).

Not applicable
Author

Thanks.

That helps me to keep my hard coded customers visible, but it seems to change my expression values significantly.

Do I need to specify something more specific in the expressions?

(Conseptually for me I'd like to apply the {1} somewhat inside the calculated dimension definitions, but I'm new to QV...)

Regards,

Tom Arne

Not applicable
Author

This is something you need to specify in the expression. Hope it helps!

sum( {1<Region= {US} >} Sales)

returns the sales for the region US disregarding the current selection.

Nicole-Smith

Is there any way you can post a sample .qvw of what you're trying to do?  Or at least tell me what your dimensions and expressions are?

Not applicable
Author

Hi,

sure. Now I've made an example with synthetic data. In the bar chart you see I have added a calculated dimensjon where I have filtered to see only customers A and B. If I click on customer C in the list box the bar chart will be empty, but I want the bar chart to display A and B regardless of customers chosen in the list box (but I want the bar chart to take the chosen months into consideration).

Any tip for how to implement a chart that focuses on a few "hard coded" customers?

Regards,

Tom Arne

Not applicable
Author

Hi Tom

Please look into Solution chart. Hope it helps!

Not applicable
Author

Thanks, that made me understand some more about filtering in expression instead of on dimension.

But I only want the chart to override the document customer filtering, and not the month filtering. If that easily available?

-Tom Arne

Not applicable
Author

Hi Tom

We are not using month filtering anywhere. I am little confused now about your requirement. Could you please make it little clear?

Thanks,

Attitude

Nicole-Smith

If you make the expression on your sample file:

sum({<Customer = >}Sales)

It will ignore any selections made in Customer, but will reflect any other selections (so your month filtering should still work).