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: 
Not applicable

Aggr function used for dimension

I am using an aggr function for an item dimension.  It basically checks to see if the qty shipped (NO_UNITS) is not equal to zero, because I only want to see items that meet this criteria.

Well I have another criteria I need to add to this & I'm not sure how I would write this out.

I also need to not have any items that begin with the letter 'B' to be included in the set.

Is it possible to do this?????

Here's the function that I have so far:

=aggr(if(sum({<FYEAR={$(vCompYr)},QUARTER={$(vCompPrd)}>}(NO_UNITS))<>0, ITEM),ITEM)

1 Solution

Accepted Solutions
sunny_talwar

Then try this:

=aggr(if(sum({<ITEM -= {'B*'},FYEAR={$(vCompYr)},QUARTER={$(vCompPrd)}>}(NO_UNITS))<>0, ITEM),ITEM)

View solution in original post

3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try: =aggr(if(sum({<ITEM={'B*'},FYEAR={$(vCompYr)},QUARTER={$(vCompPrd)}>}(NO_UNITS))<>0, ITEM),ITEM)


talk is cheap, supply exceeds demand
Not applicable
Author

This gives me all the items that begin with 'B' and I need items not beginning with 'B' and qty shipped <> 0

If I do <> I don't get any items to display

sunny_talwar

Then try this:

=aggr(if(sum({<ITEM -= {'B*'},FYEAR={$(vCompYr)},QUARTER={$(vCompPrd)}>}(NO_UNITS))<>0, ITEM),ITEM)