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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
valpassos
Creator III
Creator III

Excluding values in AVG not working

Hi community,

I have a duration measure in days that tells me how much time a task took to be completed, in average, as follows:

AVG(Interval([Task Completed Date] - [Task Started Date])


But there are certain tasks that take less than half a day (<0.5 of duration) to be completed, and I want to exclude these tasks from my AVG duration. How can I accomplish that?

I have tried the following:

AVG({<%Task_Duration-={"<0.5"}>} %Task_Duration)

This is supposed to exclude tasks whose duration are less that 0.5 days, but it isn't working as expected - the AVG is still counting them.


What am I doing wrong?

 

Thank you for your help!,

Lisa

Labels (2)
15 Replies
valpassos
Creator III
Creator III
Author

Hi @dplr-rn ,

The output in KPI is the same that I've showed in the table. The value for the average task duration is showing 5.28, with or without set analysis.

dplr-rn
Partner - Master III
Partner - Master III

whats the data type for %Task_Duration?

Also Put values for that into a striaght table and check values

valpassos
Creator III
Creator III
Author

Not sure if this is the result we want:

 

taskduration2.PNG

 

 

valpassos
Creator III
Creator III
Author

It's number type.

Yeah that's what I did, I put the expressions in a straight table, like I've shown in the printscreen.

dplr-rn
Partner - Master III
Partner - Master III

not the expressions. the actual values of the duration column

valpassos
Creator III
Creator III
Author

But the duration is defined as Interval([Task Completed Date] - [Task Created Date]), and that's what I have in the table, wrapped around with an AVG aggregation to show values. So those are the actual values.