Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Applicable88
Creator III
Creator III

How to write count aggregation with filter like in set-analysis

Hello,

I have following situation:

Applicable88_0-1593754558040.png

I want to make an dimension like this:  aggr(count(Serialnumbers),[Date.autoCalendar.Date]) (Works perfectly fine)

Now I want this aggregation only with Status K, or V:

aggr(count{<Status='K'>}Serialnumbers), [Date.autoCalendar.Date])

but wether the aforementioned nor the following seems to work:

=aggr(count(Status='K'}Serialnumbers),[Date.autoCalendar.Date])

Syntax seems to be right so far. Maybe someone has several options for me.

Thanks. 

2 Solutions

Accepted Solutions
Lisa_P
Employee
Employee

Curly brackets around K missing

aggr(count{<Status={'K'}>}Serialnumbers), [Date.autoCalendar.Date])

View solution in original post

Applicable88
Creator III
Creator III
Author

Hello @Lisa_P ,

I just found the problem:

 

aggr(count({<Status={'K'}>}Serialnumbers), [Date.autoCalendar.Date])

once again forgot another bracket. 

Thank you very much . 

View solution in original post

4 Replies
Lisa_P
Employee
Employee

Curly brackets around K missing

aggr(count{<Status={'K'}>}Serialnumbers), [Date.autoCalendar.Date])

Applicable88
Creator III
Creator III
Author

Hi @Lisa_P ,

I corrected this:

aggr(count{<Status={'K'}>}Serialnumbers),[Date.autoCalendar.Date])

But it still doesn't work.

Is it maybe set expression syntax is not available in an aggregation? I just cannot get the last bracket closed with a yellow hilighted, it stays red even the count of open and closed brackets is right. 

But when I write like this I have no problem with it giving me an 'OK' for the syntax:

=aggr(count({Status='K'}Seriennummern),[Date.autoCalendar.Date])

But still it giving me Null values for all serialnumbers: 

Applicable88_0-1593758295778.png

 

Lisa_P
Employee
Employee

Can you send a screenshot from within the expression editor with coloring ?

Applicable88
Creator III
Creator III
Author

Hello @Lisa_P ,

I just found the problem:

 

aggr(count({<Status={'K'}>}Serialnumbers), [Date.autoCalendar.Date])

once again forgot another bracket. 

Thank you very much .