Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Fareeha123
Contributor III
Contributor III

Split Straight table into 2 tables

I have field country and measure as  column1 (0-15days), column 2(16-30Days) column 3(31-60Days). Requirement is to show ascending order first 15 countries in first table, next 15 countries in 2 table and remaining in the last table. I am trying ceiling and rank function but i am not able to achieve the result. Can someone guide ? depending on client filter the number of countries will vary. Requirement is to design by default 15 countries in 1st table and so on. 

 

Please find attached screenshot of table. 

Labels (2)
2 Replies
Anil_Babu_Samineni

try like this having one field

AutoNumber(Country, IterNo()) as Country_Rank

and use this for your measures to show like

Sum({<Country_Rank = {'<15'}>} Sales)

Sum({<Country_Rank = {'>15<30'}>} Sales)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
marcus_sommer

I think you need at least a two-step approach for such a scenario whereby the first one calculates the entire table and the second one filters the results against the rank. It might be go in this direction:

sum(aggr(sum(Expr), Country, Days)) *
sign(match(rank(sum(Expr)), 1,2,3,....))