Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

Conditional show/hide in bar chart and combo chart

Hi,

I have an app where the user can select which measures to display out of 6 pre-defined. The selected measures show up in tables and charts. My problem is that in the bar-chart object there is no conditional show attribute so I did a if(index(GetFieldSelections(Labels),'Budget')>0,sum(Budget))

Works but the bars remains on their places which means that if I select the first and the last measure the bars have a great space between them. I would like the bars to be next to each other. Anyone have an idea of how to solve this or should I wait for the show-condition to be implemented in the standard bar-chart?

barchart.png

 

1 Solution

Accepted Solutions
Highlighted

Why don't you use 2 dimensions with 1 measure? Here dimension 2 will be Label and your expression will then by made up of Pick Match statement

Pick(Match(Label, .....),
Expression1,
Expression2,
Expression3,
...)

 

View solution in original post

6 Replies
Highlighted

Not sure if it will make a difference, but have you tried to uncheck 'Include Zero Values' under Add-Ons -> Data Handling?

Highlighted
Partner
Partner

Hi,

Yes I did so and also tried to add a 0 as the else condition in the if-statement. That didn't change anything though.

Highlighted

How many expressions and dimensions do you have in your chart?

Highlighted
Partner
Partner

1 dimension and 6 measures

Highlighted

Why don't you use 2 dimensions with 1 measure? Here dimension 2 will be Label and your expression will then by made up of Pick Match statement

Pick(Match(Label, .....),
Expression1,
Expression2,
Expression3,
...)

 

View solution in original post

Highlighted
Partner
Partner

Yeah, that's a good suggestion, I'll try that right away.  The only drawback I think is that it cannot be used in a combo-chart if I want any measure to be presented as a mark instead of a bar. But I'll try it and it might be just good enough at this moment. Thanks for the hint!