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: 
Touix
Contributor III
Contributor III

Bar Chart - Show Null Value with a dual() expression

Hello All,

I am quite  annoyed with my bar chart.

I have a list of products sold with a discount or not.

example: 

Product, Nb sell with discount, nb sell without discount,  average amount of price  of discount

Pen, 0,2,-

Glass,2,8,50

Mask ,1,0,10

 

I have a problem in my bar chart to show the Pen value.  I have my product as dimension and my expression is

dual('Nb sell with discount :' & count([Nb sell with discount]), avg([amount of price  of discount]) )

but because my average amount for pen is null, it is not showed in my graph.

 

My question is how to show Pen with a label Nb sell with discount : 0 even my expression avg([amount of price  of discount]) is null ?

Thank you so so much for your help,

 

Regards

 

1 Reply
Digvijay_Singh

May be try alt(avg([amount of price of discount]),0) to have value 0 in case expression results into null.