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

To show the sum of only those rows which has been displayed instead of sum all the rows in a straight table

I have straight table in which i am displaying top 10 records based on a field(Sales) with ascending order of value. I want to have the SUM(SALES) only for the values that are displayed on the chart and to store this sum in a variable. Please note that I have listboxes which act as filter and based on the value selected in listbox the chart value changes.

I tried to use the AGGR and RANK function but it is not working as i want to store the SUM in a variable.

Please let me know how I can achieve this. I would really appreciate a quick reply.

Thanks,

Sammir

1 Solution

Accepted Solutions
Alexander_Thor
Employee
Employee

Would rangesum(Top(sum(F2),1,10)) work for you?

In QV11 you will get "real" dimension limits. In QV10 we still send all the available values to chart and then only display the number you set.

View solution in original post

4 Replies
Not applicable
Author

Hi Samir,

We can help you if you can attach your QV file with some sample data.

Regards,

Sajeevan

Not applicable
Author

Hi,

I have attached an sample application. The application has 2 fields - F1 and F2.

I am showing top 10 records in straight table based on SUM(F2).

In third column I want to have the following expression - SUM(F2)/SUM(Top 10 F2 values from the straight table)

However if you see it is doing SUM(F2)/SUM(All F2 values from the straight table)

Please let me know if you need any more details.

Thanks,

Samir

Alexander_Thor
Employee
Employee

Would rangesum(Top(sum(F2),1,10)) work for you?

In QV11 you will get "real" dimension limits. In QV10 we still send all the available values to chart and then only display the number you set.

Not applicable
Author

Thanks Alexander.

It worked for me.