Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

How to select top 5 data from a dataset

Hey People,

I want to create a table containing top 5 say 'drugs' based on total sales..How do i do that without making any change in the database?

1 Reply

How to select top 5 data from a dataset

Hi,

Try with rank function

     Sum({<Drugs={"=Rank(Sum(Sales))<=10"}>} Sales)

Or

=IF(AGGR(RANK(SUM(Sales)), Drugs) <= 10, SUM(Sales))

Celambarasan

Community Browser