Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

count null values and zero values

Hi everyone,

i have a problem, i need count all points without sales. I'm using the next expression

nullcount ({$<Año={$(sel_ano)},fecha={"$(=date(today()-1))"} ,

tip_nombre={'1.HC','2.CG','3.BS-YD','4.VG','5.YF','6.KK','7.LC','8.LG','9.PJ','10.PN','11.TB','12.NB','13.SH'},

codTienda-={'ircc-B001','papa-P022','lenos-S753','ircc-B771','ircc-O003','ircc-V407',

'ircc-V182','ircc-V082','ircc-V481','ircc-V470','ircc-V098','ircc-V222',

'ircc-V224','ircc-G737','ircc-Y773','lenos-V004','papa-N000'}>} vd_valor_neto_R)

For this case, work fine, but i need to count zero values too. I try with some functions and if statements, but  i can't do it. I'm new with qlikview. Anyone have some opinion?

4 Replies
Ralf-Narfeldt
Employee
Employee

Have you tried this?

Sum(If(<your_expression>=0,1,0))

ToniKautto
Employee
Employee

To count zero values, simply add set modifier for vd_valor_neto_R being zero in your set expression. Since zero is not a null value, you have to use the Count() function

count ({$<vd_valor_neto_R={"0"}>} vd_valor_neto_R)

Then you just expand the set modifier to what ever you need.

Not applicable
Author

Hi Ralf,

Yes i did it , but not work. Thanks for your reply.

Not applicable
Author

Hi Toni,

Thanks for your reply and solution. That's work.

Regards