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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Wants the totals to show the sum of only those rows which has been displayed instead of sum all the rows in a straight table!

Hi

In a straight table I am restricting number of rows to be displayed in the chart by passing a variable in the Properties --> Presentation --> Next to: Max Number(1-100)--> vRow, where vRow is a variable!

But the total which has been displayed using Properties --> Presentation --> Totals is giving the total all the records. I want the total to calculate the total of only those rows which has been displayed instead of all the rows.

Could you please help me out on this!

7 Replies
Not applicable
Author

Hi

Imagine if 100 of rows are data are there in the straight table. I am restricting the Number of rows of data to be displayed as 10 using the variable vRow. But the total is showing the sum of all the 100 rows. What I need is total should show only the sum of 10 rows not all the 100 rows.

Hope it is understandable now!

Not applicable
Author

Hi

Looks like nobody has understood what I need! So have attached the sample application to your understanding. Hope some one can help me out on this.

kji
Employee
Employee

set your expression to:

if(RowNo()<=vRow,Sum(Column2),NULL)

and change the Total mode to Sum of Rows.

pat_agen
Specialist
Specialist

Hi,

a sum with an if clause would do what you require. check the qvw.

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Have you tried changing the total mode from Expression Total to Sum of Rows?

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi Jonathan I have already did that but it is still the same! 😞

Not applicable
Author

Hi Johan

It works with the sample file which I have given. But in my real application expression is like below and it doesn't work with that. I don't know what to changes are required in that. Can you please check it once!



Sum({<[Week] = {'$(vSelectedWeek)'}>} [$(vCurrent)])