Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to exclude 0 values in an average calculation?

If I have different fields whit for example 2 3 0 values how can I exlude that 0 value in the calculation in Qlik Sense?

Thanks

3 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

There are multiple ways of doing it.

You can use if statements in script and get rid of those values.

If you still need those for some other calculations then you can flag them in script.

You can also use set analysis in front end to avoid those records from calculations.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Anonymous
Not applicable
Author

Thanks,

Yeah, I have to do the average of four numbers but sometimes there's in one field with zero values, so in those cases I want to do the average over three number.

Thiago_Justen_

One way of doing this is:

Avg ({<Value={">0"}>}Value)

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago