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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
ivandrago
Creator II
Creator II

Help with Average condition

Hi, I want to average a field where it meets a condition? How would I write the expression for this?

Below is what I currently have for the field expression:

Avg(Sales)

What I want it changed to is that it will Average the Sales field if the flag is equal to 1

Avg(Sales) where Flag =1

Thanks

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

avg({<Flag={1}>} Sales)

View solution in original post

1 Reply
johnw
Champion III
Champion III

avg({<Flag={1}>} Sales)