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: 
simonius
Contributor
Contributor

create sum of column without losing all the rows

Hi,

 

I need per row a sum of the entire collection. 

 

The only thing I find to create a sum is with the aggregateRow. But this removes my rows. And just gives me the total. 

 

How can I per row convert column B from single row value to the total of all rows. I need this in every row of my selected data.

 

Kind regards, 

Labels (2)
1 Reply
vapukov
Master II
Master II

Hi,

 

you can use tJavaFlex( or tJavaRow) between source and destination, here you just store to a variable 

as an example with tJavaFlex:

in the top section:

globalMap.put("SumTotal",0);

in the middle section:

globalMap.put("SumTotal", globalMap.get("SumTotal")+row1.ColumnB);

of course, you need to control null values