Qlik Community

Ask a Question

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Bar Chart Based on Condition

Hi,

I am having region and city bar chart. In one region there are many cities. I created a bar chart which showing all the regions and another bar chart for the cities. What I need is if I select any of the region then the bar chart with cities should display that is if no region selected then city bar chart should be hidden.

1 Solution

Accepted Solutions
MVP
MVP

in your cities bar chart

layout--> show--> conditional

use the expression

GetSelectedCount(NameOfYourRegionField)>0

the cities bar chart will show only when 1 or more region is selected

another useful function for similar requirement is GetPossibleCount

View solution in original post

5 Replies
MVP
MVP

in your cities bar chart

layout--> show--> conditional

use the expression

GetSelectedCount(NameOfYourRegionField)>0

the cities bar chart will show only when 1 or more region is selected

another useful function for similar requirement is GetPossibleCount

View solution in original post

Creator III
Creator III

Hello,

PFA

in chart properties

Set following:

Layout->show->conditional=getselectedCount(region)>0

Regards

Not applicable

Hi Massimo,

Thanks for your response. By giving this the city bar chart is hiding but not showing even if I select any of the region.

In chart properties -> Layout -> Show -> Conditional =>  =GetFieldSelections(Region) > 0 and thats it.

Hope this helps

Thanks & Regards

You are looking for a drill down group consisting of the groups region and city used as the dimension in only one bar chart.

In the dimensions tab of the chart properties you can create this group.

The initial state of this chart would be to display bars per region.

When selecting a region-bar in the chart, the dimension group would drill down to the cities of the selected region.

No need for seperate charts and conditions to hide or display one.

regards

Marco