Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
TomBond77
Specialist
Specialist

calculate average for values > 0

Hi experts

This formula works fine:

avg( ([Entry Date (CPUDT)] - [Posting date]))

This formula not:

avg( ([Entry Date (CPUDT)] - [Posting date])-={'0'})

Any ideas how to solve this issue?

Thank you, Tom

Labels (4)
1 Solution

Accepted Solutions
MarcoWedel

maybe like 

Avg(If([Entry Date (CPUDT)]<>[Posting date],[Entry Date (CPUDT)] - [Posting date]))

or using some key field and set expression instead of the If() function:

Avg({$<Key={"=[Entry Date (CPUDT)]<>[Posting date]"}>} [Entry Date (CPUDT)] - [Posting date])

View solution in original post

1 Reply
MarcoWedel

maybe like 

Avg(If([Entry Date (CPUDT)]<>[Posting date],[Entry Date (CPUDT)] - [Posting date]))

or using some key field and set expression instead of the If() function:

Avg({$<Key={"=[Entry Date (CPUDT)]<>[Posting date]"}>} [Entry Date (CPUDT)] - [Posting date])