Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey so I have an excel file that has 802 lines of data with two columns, one being product and the other being model. In this data, some of the products or model repeats, so if I count distinct product and model there is 757 and 340 respectively. Anway, I try counting the Model with using the technique set analysis:
Count(ALL {<Product = {'*'} Model)
But I get 757 as the total #, which is not what I want, it should add up to be 802. I did it another way but creating a table and having an expression to set every line to 1 and do the sum of that and I get 802. My question is, is there a function in qlikview that allows me to count every single line items, even the ones that are null?
There is a nullcount expresion.
NullCount( [{set_expression}] [ distinct ] [ total [<fld {, fld}>] ]expression | field)
count(all{<Product = {'*'} Model) + nullcount(all{<Product = {'*'} Model)
there maybe and probably a better way of doing this... 🙂
I doubt if you need Set Analysis for your purpose... If I understand it correctly, one of the two fields is sometimes equal to null(), but you simply want to count all the lines, no matter what - missing or duplicate. How about counting concatenated values:
count(Product&Model) - this way, you should get 802. Use qualifier "ALL" if you also need to ignore selections.
cheers,
Oleg
Hey Oleg,
Thanks alot, I tried using count(Product&Model) and I get 0. Any reason why?
Thanks for the help.
try textcount() instead