Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
GabrielN
Contributor
Contributor

bar chart - Show only dimensions (bars) that do not include filter selection

Hi everyone, I am quite new to Qlik Sense so I assume my problem is quite basic.

I have a bar chart (see photo attached) Bild1.jpg

- dimensions are Checklist parameters - called "category" in my syntax

- measure is count(database) that basically counts the number of different checklists - each color stands for a specific checklist - that includes the parameter

Via a filter - applied on "database" - I want to select a checklist and show in the bar chart only checklist parameter that are not included in that specific checklist.

In my understanding I need to put in the field of the dimension something like = {1-$<database}category but I am pretty lost here. Thanks for you help

5 Replies
OmarBenSalem

You could use the e() :

See this and replicate it to ur need:

Dimension : MonthYear, Type

Measure:if(GetSelectedCount(MonthYear)=0,Count(Type),
Count({<MonthYear=e(MonthYear)>}Type))

Result:

If I don't select any Month:

Capture.PNG

Now, if I select Oct 2048, it'll disappear:

Capture.PNG

Same thing if u select more then one month:

Capture.PNG

 

 

 

GabrielN
Contributor
Contributor
Author

Thanks for the fast and helpful reply! Now the only difference to your example: (Using you syntax) I don't select the MonthYear but the Type in the filter. Now I want the every MonthYear to disappear if the count of the selected type = 1 --> something like if I select "Delay" in the filter all the "MonthYear"s with delay should disappear in my chart. I only want to see the ones that do not have a delay How can I do that?
OmarBenSalem

Have u tried:

Count({<Type=e(Type)>}Type))

OmarBenSalem

Example:

Dim;:

ID, Value

Measure:

if(GetSelectedCount(Value)=0,Count(Value),
Count({<Value=e(Value)>}Value))

No selection: Capture.PNG

 

Select A:

Capture.PNG

Select  B:

Capture.PNG

GabrielN
Contributor
Contributor
Author

That is about how far I got with the help of your first post. However, I need one step further. I also want to hide ID={'1'} if I select type "A" (or in that particular example also "B"). In my real life I have lets say more types C,D, E & F. and if I select "A" I want to hide all ID bars that include it
e.g.

ID 1 - A, B, C, E  --> hide
ID 2 - B, C, E, F --> show
ID 3 - B --> show
ID 4 -  A --> hide
ID 5 - A, B --> hide

Do you have an idea? Thanks