Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Count function and expression

Hello all,

I am finding some difficulty in using the count function, but using an expression to define what to count. Here is what I am trying to do:

=count({<left(aVar ,4)= {'Past'}>} aVar) / Count(aVar)

All I am trying to do with the above count is count only the variable that starts with the word "Past" and dividing it by the total count of the variable.

I get an error on the above statement and have no idea how to fix. Any help is much appreciated.

thank you

Roberto

1 Solution

Accepted Solutions
sunny_talwar

Is aVar a field or variable? If it is a field, try this

=Count({<aVar = {"Past*"}>} aVar)/Count(aVar)

View solution in original post

2 Replies
sunny_talwar

Is aVar a field or variable? If it is a field, try this

=Count({<aVar = {"Past*"}>} aVar)/Count(aVar)

trdandamudi
Master II
Master II

One more way may be as below:

=Count({<aVar= {"=Left(aVar ,4)= 'Past' "}>} aVar) / Count(aVar