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

Counting the Number of Negatives in a Table

Good Morning \ Good Afternoon \ Good Evening

I have a scenario where I have a table containing this year vs last year sales and I want to be able to count the number of negatives and positive values. So that we can say something like we have 75 growths vs 25 contractions.

I want to be able to present this at a aggregate level instead of line by line detail.

In excel it would be a countif() statement on a range of a cells, but I am struggling to figure out the same in Qlikview.

Any ideas of how to accomplish ?

The Table which I want to reference looks like the below

Thanks for any help.

Capture.JPG

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Have a look at advanced Aggregation function Aggr(), something like

=-1* Sum( Aggr( ExprThisYearSales > ExprLastYearSales , AllYourChartDimensions))

View solution in original post

3 Replies
swuehl
MVP
MVP

Have a look at advanced Aggregation function Aggr(), something like

=-1* Sum( Aggr( ExprThisYearSales > ExprLastYearSales , AllYourChartDimensions))

Anonymous
Not applicable
Author

Thanks Stefan,

The Aggregate Function is something I need to play some more with but this works really well.