Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
JustinDallas
Specialist III
Specialist III

Aggregate(Sum) in Straight Table Excludes Values

TL;DR Addition of Measure to Table excludes rows that don't have data matching the set requirement ({<IsRollingThirtyLeg={1}>})

Hello Folks,

I've got a Table which pretty much just shows the contents of a table, except for one column.  It's a measure and it looks like this:

SUM({<IsRollingThirtyLeg={1}>} lgh_miles)

The strange thing, is that when I add this measure to the Straight Table, the only rows that are brought back are ones that "have lgh miles over the past 30 days".

Has anyone ever seen this happen before?

Any help is greatly appreciated.

EDIT: Changing my measure from

SUM({<IsRollingThirtyLeg={1}>} lgh_miles)

TO

SUM(if(IsRollingThirtyLeg='1' , lgh_miles))  fixed it.  I'm not sure why.

Message was edited by: Justin Dallas

3 Replies
swuehl
MVP
MVP

Probably yes.

Is this your only expression or how do your other expressions look like?

As always, context is important.

JustinDallas
Specialist III
Specialist III
Author

There are no other expressions, the rest of the columns are dumb fields with "Show Null Values" checked.  The Measure in the Table however doesn't have the "Show Null Values" option.

swuehl
MVP
MVP

I believe what you are observing is the default behaviour of Qlik using set analysis.

The set analysis is restricting the record set internally used for your chart before the chart's cube is actually built and aggregation functions are evaluated, hence it also limits the dimensional values by default (just like making manual selections).

If you are using a Sum(If()) instead, the internally used record set is not affected, the aggregation function will loop over all records and then filter by the If() condition, which values to consider for aggregation.