Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pivot chart problem when collapsing row disappears

In the attached example I made a very simple pivot, but when I collapse the first Column called 'Item' then line '1' disappears.

Any idea why this happens?

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Here's an expression that should work:

Sum(aggr(IF([Posting Date] < MonthEnd(Max(%KeyDate)) AND [Clearing Date] > MonthEnd(Max(%KeyDate)),sum(Amount)),Item,[Posting Date], [Clearing Date]))

It calculates the sum for every dimension combination and then sums them up accordingly so you should get the right total on each dim level regardless of how you expand your dimensions.

View solution in original post

4 Replies
Anonymous
Not applicable
Author

In your expression you're comparing using the "Posting Date". For item 1 you have more than one posting date and since there's no aggregation (i.e. max([Posting Date]) or similar), QlikView will return Null() when you're comparing using Posting Date. The whole expression will result in null and be supressed.

Not applicable
Author

I more or less understand what you mean, but I don't know how to incorporate this in my expression so that this line will remain visible and the sum of the amounts is correct.

Any idea?

Anonymous
Not applicable
Author

Here's an expression that should work:

Sum(aggr(IF([Posting Date] < MonthEnd(Max(%KeyDate)) AND [Clearing Date] > MonthEnd(Max(%KeyDate)),sum(Amount)),Item,[Posting Date], [Clearing Date]))

It calculates the sum for every dimension combination and then sums them up accordingly so you should get the right total on each dim level regardless of how you expand your dimensions.

Not applicable
Author

Thanks! This works perfect!