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

giving value to max 5 value

I am tring to give different values for max 5 row in straight table.

for example 1.max value=5,

------ 2.mav value=4,

------ 3.mav value=3,

------ 4.mav value=2,

------ 5.mav value=1

1 Solution

Accepted Solutions
its_anandrjs
Champion III
Champion III

Hi,

Use this code

if(isnull(6-if(rank(Total Amount)<=5,rank(Total Amount))) , ' ',6-if(rank(Total Amount)<=5,rank(Total Amount)))

As a rank of the table in second expression.

See the attched.

Rgds

Anand

View solution in original post

9 Replies
its_anandrjs
Champion III
Champion III

Hi,

Sort the expression in descending order sum(Amount) and set a variable and use it to display top max values

Like vMax = 0 and use this variable in input box and set a variable in chart properties Max Number -> check mark it -> and paste a variable there =vMax

See the atttached sample file and solution sheet.

Rgds

Anand

SunilChauhan
Champion II
Champion II

see the attached file

hope this you required

Sunil Chauhan
Not applicable
Author

I am tring to find max Amounts and give them these values

its_anandrjs
Champion III
Champion III

Hi,

You see my application

Rgds

Anand

Not applicable
Author

NameCatIDsum(Amount)value
4748,59
Bill310005
Chris19972,54
Jack16003
Chris20563,552
Chris185551
Bob12444
Bob8300
Jack666
Bob1055
Bob744
John544
Bob240
John1323
Jack1510
Bob118
Chris175,54
Bob95
Jack165
John44
John144


this is what I am tring to do

its_anandrjs
Champion III
Champion III

Hi,

I suggest if in place of this if you set a variable then use this varaible in the strainght chart to diaplay top 5, top 10, top 15 etc is a best parctice to show the data

See the attached Solution Sheet sample file.

Rgds

Anand

vincent_ardiet
Specialist
Specialist

Hi,

Try this expression : =6-if(rank(Total Amount)<=5,rank(Total Amount))

Regards,

Vincent

its_anandrjs
Champion III
Champion III

Hi,

Use this code

if(isnull(6-if(rank(Total Amount)<=5,rank(Total Amount))) , ' ',6-if(rank(Total Amount)<=5,rank(Total Amount)))

As a rank of the table in second expression.

See the attched.

Rgds

Anand

Not applicable
Author

this is absolutely what I need thank you very much:))

can I calculate total amount with a set analysis