Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Bar Chart with (empty) bars

Hi guys,

I have created a bar chart with 2 expressions and 1 dimension. Furthermore I have also selected "Suppress when value is null" and "supress zero values". However my chart shows a blank bar (so a white space for one empty bar) in case one of my expressions has no values.

Do you know how to suppress these empty bar ?

Best

Harry

7 Replies
ThornOfCrowns
Specialist II
Specialist II

What's on the axis in that picture?

Anonymous
Not applicable
Author

Hi,

In Script:


If (Len(Trim(FieldName) > 0),1,0) as FieldName1


In Bar Chart  :


=Count({<FieldName1 = {'1'}>} FieldName)


Regards

Neetha







vinay_hg
Creator III
Creator III

check "supress when value is null" option in dimesion and uncheck "show all values" if checked. then empty bar will not come. this will happen when there is no value in dimension against expression items, all the values consolidates and comes in separate bar with '-' sign.

see for the option below in dimesion tab in chart properties

1.JPG

Not applicable
Author

Thanks! With Neethas solution I have now the empty bar displayed as 0% in case there are no values. However I want to hide this bar in case there are 0%.

Does anyone know how to do this?

Many thanks,

Harry

Anonymous
Not applicable
Author

Hi,

it might be  0.20%, change formatting to display decimal as well.

Regards

neetha

Not applicable
Author

Thanks Neetha! I have checked and the result is 0.0000.

Best

Harry

Anonymous
Not applicable
Author

Try in script:


If (Len(Trim(FieldName) => 1),1,0) as FieldName1