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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Requirement on table box

Hi

i have table box in that i have 5 fields

for example:

City            population     Growth   P%   Status

London,          22000          2%     1%     Green

New York        12500          1%     0.5%   yellow

Spain               52000         29%   5%    Green

Delhi               1300             0%    2%    Red

Hyd                  15000          5%    1%    green

i have to display only last 3 records  how to do this .i am using table box here

Thanks

15 Replies
engishfaque
Specialist III
Specialist III

Dear Abubakar,

Kindly use listed below data model for loading last 3 records. For more, Kindly find attached App.

[Temp Table]:

LOAD *, RecNo() as Temp_RecNo Inline [

City, population, Growth, P%, Status

London,    22000, 2%,  1%,    Green

New York,  12500,      1%,  0.5%,  yellow

Spain,      52000,      29%,  5%,    Green

Delhi,      1300,      0%,    2%,    Red

Hyd,        15000,      5%,    1%,    green

];

First 3 //Load First 3 Records, you can increase the number of last record load by replace 3 with you required number of records

NoConcatenate

[Main Table]:

LOAD

  *

Resident [Temp Table]

Order By Temp_RecNo desc;

DROP Field Temp_RecNo;

DROP Table [Temp Table];

Kind regards,

Ishfaque Ahmed

MarcoWedel

Hi,

as the number seems more important than the actual values, maybe one solution might be:

QlikCommunity_Thread_216878_Pic1.JPG

QlikCommunity_Thread_216878_Pic2.JPG

QlikCommunity_Thread_216878_Pic3.JPG

QlikCommunity_Thread_216878_Pic4.JPG

table1:

LOAD * INLINE [

    City, population, Growth, P%, Status

    London, 22000, 2%, 1%, Green

    New York, 12500, 1%, 0.5%, yellow

    Spain, 52000, 29%, 5%, Green

    Delhi, 1300, 0%, 2%, Red

    Hyd, 15000, 5%, 1%, green

];

hope this helps

regards

Marco

Not applicable
Author

Correct Answer

MarcoWedel

Please mark an answer correct to close your thread.

thanks

regards

Marco

Anil_Babu_Samineni

Siddiq,

How Marco's file is correct.

If you are added one more row. Then you will not get that data(Row) right.

So, Please check that...!

If fine, Your issue which mention the Marco please Mark the Correct Answer...

Good Luck...

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
Not applicable
Author

i implemented below expression

=Only({<City = {Spain,Delhi,Hyd}>} City)