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

Average Calculation excluding Negative Value and Zero

I have calculated Avg of sales with two way just i want to know which one is correct.

1) When i have calculated AVG of sales first time i took all the value with negative and Zero .

2) When i have calculated second time AVG of sales i have exclude the negative value and zero.

just i want to know which one is correct.

Also i have attached the excel and qvd. Kindly refer attached.

1 Solution

Accepted Solutions
marcus_sommer

It's not a technically question else it depends on the business-logic if any values and if yes which ones should be excluded or not.

- Marcus

View solution in original post

3 Replies
marcus_sommer

It depends on your requirements which calculation returns the expected values. Quite helpful for considering the right approach is the following: Average-Which-average

- Marcus

sachin08
Contributor II
Contributor II
Author

Should i exclude the negative value during Average calculation in script.

marcus_sommer

It's not a technically question else it depends on the business-logic if any values and if yes which ones should be excluded or not.

- Marcus