Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
gr_eldred
Creator II
Creator II

not is null

I need to apply a count of a concatenated field but one of them contains a null try this but it has not been successful, can you help me ?.

count(Distinct Pto_vta_ID&%Folio_Fac)

Greetings.

8 Replies
sunny_talwar

Not sure what the issue you are running into because of null, but may be try this

Count(DISTINCT If(Len(Trim(Pto_vta_ID)) > 0, Pto_vta_ID, '@') & If(Len(Trim(%Folio_Fac)) > 0, %Folio_Fac, '@'))

gr_eldred
Creator II
Creator II
Author

I continue with the same problem appears in the first row

distinc.png

sunny_talwar

You don't want to count it?

gr_eldred
Creator II
Creator II
Author

the first row that comes empty I do not want to tell

sunny_talwar

You don't want to count that? May be this

Count(DISTINCT If(Len(Trim(Pto_vta_ID)) > 0 and Len(Trim(%Folio_Fac)) > 0, Pto_vta_ID&%Folio_Fac))

gr_eldred
Creator II
Creator II
Author

just what I needed, thank you very much.

Anil_Babu_Samineni

You can try this way too? Create field in script.

If(Len(Trim(Pto_vta_ID)) > 0 and Len(Trim(%Folio_Fac)) > 0, 1,0) as Flag


And set Analysis should be like below


Count({<Flag = {1}>} Pto_vta_ID&%Folio_Fac)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anil_Babu_Samineni

You can mark Correct answer of sunny's latest reply. That may useful to others when they land-up to the same thread.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful