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: 
nicolai_moller
Contributor
Contributor

count values and null in expression

Hi

In my sample data I want to write an expression that counts all cases where the field 'Exp' doesn't end with 1 or 0.

I would also like the expression to return cases with empty values in the field 'Exp', so the sample data should give me 3 cases (2, 3 and 5)

Thanks

Sample data:   

   

caseExp
1  5|1
2  4|2
3  3|3
4  3|0
5
2 Replies
YoussefBelloum
Champion
Champion

Hi,

try this on your exp expression:

=Count({<Exp={"=not match(right(Exp,1),'1','0')"}>} 1)

jaumecf23
Creator III
Creator III

Hi,

Try this.

Expression 1 : =count({<Exp-={"*|0","*|1"}>}case)

Expression 2 : =concat({<Exp-={"*|0","*|1"}>}case,',')