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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need help with conditional statement in pivot table

Hi

I have the following data:

locationsticket_numberticket_age
irvine1011
irvine1022
utah1035
utah1041

I'm trying to create a pivot table like this:

locationsticket_age <2ticket_age > 4
Irvine10
Utah11

My dimension is locations, however, I can't seem to do a conditional expression correctly to get me the counts I needed.

I tried If(ticket_age < 2, count(ticket_number)) which doesn't work.

Any suggestions?

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

put the count on the outside:

count(If(ticket_age < 2, ticket_number) )

View solution in original post

2 Replies
Not applicable
Author

put the count on the outside:

count(If(ticket_age < 2, ticket_number) )

Not applicable
Author

That's what I needed.  Thanks!