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

Straight Table - Selecting All Records within Calculated Range

I am a fairly new user to QlikView and I am in the process of doing some analysis based upon account transactions.

I have created a table by Company (dimension) and added a calculated expression to give the total value of transactions of the company (linking into a selected date/year).

The problem I have is creating a selection box that will select/group each company based upon value. For example I would like to have <10,000 , 10,001 - 25,000 , 25,001 - 50,000 etc etc.

Any advise would be well received.

4 Replies
johnw
Champion III
Champion III

If you could settle for equal-sized ranges, something like this as the expression for the selection box:

aggr(class(sum("Transaction Amount"),10000),Company)

If you want to keep your unequal ranges, something like this:

aggr(if(sum("Transaction Amount")<=10000,'<=10,000'
,if(sum("Transaction Amount")<=25000,'10,001 - 25,000'
,if(sum("Transaction Amount")<=50000,'25,001 - 50,000'
,'>50000'))),Company)

I didn't test those. If you can't get it to work, let me know, and I'll try to come up with an example to use to debug it.

Not applicable
Author

Many thanks for this, the first expression works perfect.

The second part appears to collate the totals together,

johnw
Champion III
Champion III


Ted11 wrote:The second part appears to collate the totals together,


Well, I'm not sure what you mean by that, so here's a sample file with both the class() and series of if()s working as I'm thinking you'd want. Let me know if I've misunderstood, or if it works in the example but not with your real data.

Not applicable
Author

I have just tried using your example.....it all works perfectly.

Thankyou for your help on this.