Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
geogou1973
Creator
Creator

set analysis expression

Hello,

I have a field that has values like NA, NC, NZ and values null.

How can i take only the null values in an expression of set analysis ?

sum({<isnull(CSTAAR)>} [Stock Qty])    this does not work

sum({<CSTAAR={' '}>} [Stock Qty])        this does not work also.

please any help ?

Thank you in advance.

11 Replies
sunny_talwar

May be create a flag in the script:

LOAD CSTAAR,

          [Stock Qty],

          If(Len(Trim(CSTAAR)) = 0, 1, 0) as Flag

FROM ....

and then this

Sum({<Flag = {1}>} [Stock Qty])

geogou1973
Creator
Creator
Author

Hello Sunny,

I used the following expression

sum({<CSTAAR=-{'NC','NA','NZ'}>} [Stock Qty])

sunny_talwar

If that worked, then this should also work:

Sum({<CSTAAR=-{'*'}>} [Stock Qty])

geogou1973
Creator
Creator
Author

Sunny thank you for your help.

In this formula of summarize the stock qty how can i have only the zero values ?

sunny_talwar

Not sure I understand you requirement?

geogou1973
Creator
Creator
Author

In the level of Item i have the following expression

sum({<CSTAAR=-{'NC','NA','NZ'}>} [Stock Qty])

some items have 0 (zero) values. How can i have only the zero values in the report ?

sunny_talwar

May be this:

If(Sum({<CSTAAR=-{'NC','NA','NZ'}>} [Stock Qty]) = 0, 1)

geogou1973
Creator
Creator
Author

      Sunny i have the following data and i want in the report to isolate the data with stock value 0,000

StoreStore DescrMotherMother DescrStock Qty
23EFKARPIA1140578ΡΥΖΑΛΕΥΡΟ ΟΛΙΚΗΣ ΑΛ BIO BEBE 200ΓΡ0,000
23EFKARPIA1195851ΤΟΡΤΕΛΙΝΙ FORMAGGI BARILLA 500ΓΡ0,000
23EFKARPIA1125148ΑΠΟΡ ΠΛ ΑΝΟΙΞ DIXAN25M 1,75KG ΚΟΥΤ0,000
23EFKARPIA1100115ΑΦΡΟΛ ARGAN OIL&OR L/P MARSEIL 2500,000
23EFKARPIA1182123ΑΦΡΟΛΟΥΤΡΟ SMOOTH CREAM NIVEA 750ML0,000

     

23EFKARPIA1150387ΝΕΡΟ ΜΕΤΑΛΛΙΚΟ ΔΙΟΣ 500ML6.609,000
23EFKARPIA1142495ΝΕΡΟ ΑΥΡΑ 500ΜL PET4.849,000
23EFKARPIA801224ΑΡΤΟΠΑΡΑΣΚΕΥΑΣΜΑ ΑΣΠΡΟ 350Γ3.137,000
23EFKARPIA987041ΣΑΚΟΥΛΑ ΓΙΑ ΚΟΤΟΠΟΥΛΟ 170Χ80Χ3553.000,000
23EFKARPIA435838COCA COLA ΜΕΤ ΚΟΥΤ 6X330ML2.690,000
23EFKARPIA121456ΝΕΡΟ ΜΕΤΑΛΛΙΚΟ ΖΑΓΟΡΙ 500ML2.405,000
23EFKARPIA991844SPECIAL ΨΩΜΙ ΓΕΡΜ ΧΩΡΙΑΤ 1ΚΙΛΟ CARR1.908,000
23EFKARPIA1064246ΧΑΡΤΙ ΥΓΕΙΑΣ ΣΧΕΔ4Φ CARREF10T Χ131Γ1.631,000
23EFKARPIA662976ΦΡΟΥΤΟΠΟΤΟ ΠΟΡΤ ΜΗΛ ΒΕΡ ΑΜΙΤΑ 1LT1.612,000
23EFKARPIA100860ΓΑΛΟΠΟΥΛΑ ΚΤΨ ΜΕ ΘΕΡΜΟΜ DOUXΜΕΤ ΒΑΡ1.575,799
23EFKARPIA697606ΑΝΑΨΥΚΤΙΚΟ COCA COLA 2X1LT1.494,000
23EFKARPIA1011698ΑΛΕΥΡΙ 70% ΔΥΝΑΤΟ ΚΙΛΟΥ(ΣΑΚΙ)1.475,000
23EFKARPIA936835COCA-COLA 2X1,5LT1.372,000
23EFKARPIA1221661ΤΟΜΑΤΑ ΜΑΡΑΤΑ ΨΙΛΟΚ ΜΕΤ 280ΓΡ ΣΤ.Β1.321,000
23EFKARPIA1221521ΤΟΜΑΤΑ ΨΙΛ ΧΑΡΤ ΜΑΡΑΤΑ240Γ ΣΤΑΘ ΒΑΡ1.239,000
sunny_talwar

Creating flags in the script might be the best way to handle this

LOAD Store,

          Store Descr,

          Mother,

          Mother Descr,

          Stock Qty,

          If(Stock Qty = 0, 1, 0) as Flag

FROM...

and then use the flag in your set analysis