Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
imhappiee
Contributor III
Contributor III

conditional hiding of an expression in Bar chart if the value is null

Hi

Here I am with an interesting question that is bothering me since couple of days,hope somebody helps me out here.

I have a bar chart which was made completely of customised expressions only , to be precise each bar in the image graph attached is an expression

case 1.Now all I want is to hide the bars whose expression value is equal to zero

for eg: In the image attached "marketing" and "supply" should be hidden so that the bar graph will present only the remaining 4 expressions or bars

case 2. If 1st case is not possible I would like to sort the values in the descending order so that the bars having value will be 1st and the one with zeros will be last

for eg: the bars in the img will be in the following order

advertising>Logistics>sales>sourcing>marketing>supply

Note:

The version I use is Qlikview 10 and upgrading to v11 is not possible due to some work constraints

No macro should be included for this purpose ( Acceptable only if when there is no hope with out macro- so last option)

It would be a great help for me if somebody can help me out in this.

Thanks a ton ahead

Regards,

Anand

8 Replies
m_woolf
Master II
Master II

Did you try Suppress zero values?

imhappiee
Contributor III
Contributor III
Author

Yes I did..

Not applicable

Hi

do u use in dimension tab

supress when value is null

er_mohit
Master II
Master II

hiiii. in expression

  check on conditional and write

if(marketingfieldname='  ',Null=0,Null=1)

make sure that create variable.

Null

here in above expession Null is variable

hope it helps

imhappiee
Contributor III
Contributor III
Author

aryabrahma,

The chart that I use, doesn't need any dimenison to make that chart , it is all made of expressions.

er.mohit,

Thanks, But this conditional option is available only in version11 ,I need the solution for Version 10

Not applicable

Hi

why dont  u use if condition in expression to eliminate the nulls

Not applicable

Hi,

you can use if() function to eliminate null or zero values.

example:

in your 1st expression, say 'advertising'

if(sum(AdvertisingAmount) <> 0, sum(AdvertisingAmount))

2nd expression, ;logistics'

if(sum(LogisticsAmount) <> 0, sum(LogisticsAmount))

and so on....

Regards,

Alex

imhappiee
Contributor III
Contributor III
Author

Alexis Tan,

I already tried this, but the result is only the value i.e null will not be visible , the name will still be there

eg: If logistics value is null ,the 0.0 will not be visible at the top but on x-axis you can still see the name logistics..

Aryabrahma

Tried that but still not working.

Regards,

Anand.