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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to display the sum of only selected top items in straight table

Dear All,

I am facing a typical problem. In a straight table I am displaying the top items depending upon the selection from a slider.

On the top of the straight table, I want to display the sum of the top N items which are selected from the slider. But It displays the total sum of all the items in the data set. Please help.

Please find attached a sample application:

1 Solution

Accepted Solutions
anbu1984
Master III
Master III

9 Replies
MK_QSL
MVP
MVP

Use Rank function instead of showing max numbers ....

Not applicable
Author

Dear Mainsh,

Thanks for your reply. But can you please explain in details?

Not applicable
Author

Dear manish,

She want Top analysis....

How Rank function work , please do it in Top_Analysis_Test.qvw.

Thanks in advance.

Regards,

Sukamal

anbu1984
Master III
Master III

Check this

Not applicable
Author

Dear Anbu,

Thanks for your help.

But actually I need the sum of top n products which are selected from the slider. In your application the division wise top product

i.e-Div1 wise rank1,rank2 and then Div2 wise rank1,rank2 are displayed and so on....

But I need Top product I.e-Product1(Rank1),Product2(Rank2),Product3(Rank3) (irrespective of division and department )and so on.....

Please find attached the screenshot where the display order of the items are right.But the total is appearing the total of all items in the dataset-not the sum of the selected items.

I have used the dimensions

1.Division

2.Department

3.=IF(aggr(rank(sum([Net Sale Amt])),Product)<=$(vSl),Product)

Thanks and Regards,

Debasmita Mitra

MK_QSL
MVP
MVP

First of all, go to the slider and change

max value

=COUNT(DISTINCT Product)

Now create a straight table

Dimensions

1) Calculated DImension

=IF(Aggr(Rank(SUM([Net Sale Amt])),Product)<=vSl,Product)

Tick Suppress When Value is Null

2) Department

3) Division

Expression

SUM([Net Sale Amt])

SUM(Qty)

Let me know if this is not working for you..

Not applicable
Author

Dear Manish,

Thanks for your help. I have done it.It worked. It partially solved the issue.

But the client wants the dimensions in the following Order:

1.Department

2.Division

3.Product=IF(Aggr(Rank(SUM([Net Sale Amt])),Product)<=vSl,Product)

I was wondering is it possible?

anbu1984
Master III
Master III

Check this

Not applicable
Author

Somehow I skipped your post.Thanks a lot.That's what I needed.