Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

sum across an column

hi,

i am looking to sum across all values in the last column (# of Ads)

my goal is to sum all values in the last column, like this:

is there a waqy to do this?

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Perhaps sum(total aggr(count([# of Ads]),[QlickSourceDesc]))


talk is cheap, supply exceeds demand

View solution in original post

8 Replies
Gysbert_Wassenaar

sum( total [# of Ads])


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

it's an id column, so i would like to count it (instead of sum it),

but when i use count, results are the same...

Gysbert_Wassenaar

Perhaps sum(total aggr(count([# of Ads]),[QlickSourceDesc]))


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

worked like a charm!

can you elaborate on it?

i understand the aggr function,

but i don't understand how it works when nested in a total function

Gysbert_Wassenaar

The aggr function works exactly the same as without the total keyword. The total keyword just causes the sum to be calculated disregarding the dimension boundaries of your chart.


talk is cheap, supply exceeds demand
nikhilgarg
Specialist II
Specialist II

Hey,

count([# of Ads])  will be equal to number of [QlickSourceDesc] .


Isn't it ??


Thanks

Anonymous
Not applicable
Author

now my problem is that it disregards other dimensions in my chart,

i have tried to drop the "tota" but it doesn't give me any result,

please see:

sum(aggr(count([Ad Counter]), ClickSourceDesc))

Gysbert_Wassenaar

Maybe sum(total <[Year-Month]> aggr(count([Ad Counter]), ClickSourceDesc))


talk is cheap, supply exceeds demand