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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
idrb
Partner - Contributor
Partner - Contributor

Table: avg totals without 0's

Hi everyone,

I would like to ask about the totals row in tables.

It seems the only thing that can be done in QlikSense tables is choosing a total function and, by default, this calculation take into account all row values shown. This means, for example, the avg function will take into account the '0' values.

My question is: is there any way to exclude the '0' values from this calculation?

Thanks in advance,

David

Labels (1)
1 Solution

Accepted Solutions
barnabyd
Partner - Creator III
Partner - Creator III

G'day, another approach is to remember that null values are excluded automatically, so you can convert the '0' values in the table column to nulls with something like this ...

 

if( value <> 0, value )

 

The table will now show '-' for all the '0' values, so the average function will now do what you want.

Cheers, Barnaby.

Barnaby Dunn
BI Consultant

View solution in original post

3 Replies
Or
MVP
MVP

Avg({< Values -= {"0"} >} Values)

barnabyd
Partner - Creator III
Partner - Creator III

G'day, another approach is to remember that null values are excluded automatically, so you can convert the '0' values in the table column to nulls with something like this ...

 

if( value <> 0, value )

 

The table will now show '-' for all the '0' values, so the average function will now do what you want.

Cheers, Barnaby.

Barnaby Dunn
BI Consultant
idrb
Partner - Contributor
Partner - Contributor
Author

Hi,

This solution worked like a charm!

Thank you very much!!

Cheers,

David