Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
udaya_kumar
Specialist
Specialist

Sum up the rows of the table from another table

Hi,

I have two straight tables in front end.

I have few calculated fields in both the tables. I want to sum up the rows of an expression "Expression1" from table1 in table2.

I want to use the sum of that expression from table1 into table2.

Can we get it?

Both the tables are at different levels of data.

12 Replies
sundarakumar
Specialist II
Specialist II

pls post a sample application. I fell like it is possible. woukld like to have more explanation on requirement...

It depends on what dimension is used in both the tables.

-Sundar

udaya_kumar
Specialist
Specialist
Author

Hi Sundar,

Thanks for the reply.

Table1 is at product level data and Table2 is at Store level data.

If we select a particular store, then it can filter the corresponding products.

I am evaluating an expression in table1, which shows sum of rows as 327.

I want to use this value in table2 for evaluating the expression in table2.

How do i get that value 327 (Sum of rows) from table1 and use it in table2?

sundarakumar
Specialist II
Specialist II

Am not sure how these data are linked in the back end. If it is linked at the most granular level then it should be possible. If you are trying to show the count of rows in other table it is linked to, u can do it by creating a dummy row with all 1 values in it and summing it in second table.

I would make it more clear if u can post of a sample of how dta is linked and what the exact requirement is.

Thanks,

Sundar

sundarakumar
Specialist II
Specialist II

or pls post the tables and information on by what key it is liinked and requirement.

-sundar

udaya_kumar
Specialist
Specialist
Author

Hi Sundar,

I have the file with client data. So i cannot post the file with data.

I want to sum the rows, not the count of rows.

How do you sum up the rows of table1 in table2?

senpradip007
Specialist III
Specialist III

You can upload it with scrambled data.

sundarakumar
Specialist II
Specialist II

Yes it is very well possible, if it is linked correct That is the advantage of Qlikview. Please let me know how these two talbes are linked. U can use scramble to post a sample app.  or pls cook up a sample table how we have data in the two table and what key is used to link the two tables.

-sundar

christian77
Partner - Specialist
Partner - Specialist

Hi.

do like count(distinct field1&field2...) where field1, field2 are dimensions of your table to count the rows.

I'm attaching example.

it may help you.

there is another way using a macro. First call the object id and then apply a function called noofrows. set a variable with that name.


good luck

udaya_kumar
Specialist
Specialist
Author

Hi Chris,

Thanks for the reply,

I want to sum the rows of an expression in table1 and use that summed value in table2.

If the sum of rows of expr1 in table1 is 300, then i want to get that value 300 in table2 and use it in expression in table2.