Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Split a table in intervals

Hi

I need some help with splitting a table in intervals

I have a simple table that has two fields

customerid, totalamount

This table is changed from day to day.

What I want to do is to add a column to this table ranking customers from 1-5 depending on how much they've bought (totalamount). So i want to split the table into 5 "clusters" ranking from 5-1 where 5 is the customers who has bought the most.

This seems fairly simple but I can't figure it out

Thanks in advance!

11 Replies
Anonymous
Not applicable
Author

For the second part of your question you can change the last part of the script into:

Table:
LOAD Customerid,
RowNo() as Rank,
SumTotalamount
RESIDENT Temp_Table
Where SumTotalamount >'0'
ORDER BY SumTotalamount desc;




nagaiank
Specialist III
Specialist III

I hope you have already resolved your problem. If not, you may review the attached qvw file for a solution.