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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to create an average line

Hi,

I have a combo chart, I will like to add a line for the average of records.

This is the formula created to displays the information:

SUM ({$<[Closure Code] -= {'Duplicate Request', 'Invalid DM Request'}>}[DM Case Count])/SUM ([Open Count])

How can I create an average of that formula?

If I add the avg function at the beginning I got an error on the expression.

Please advise.

1 Solution

Accepted Solutions
Anil_Babu_Samineni

How about this?

RangeAvg(SUM ({$<[Closure Code] -= {'Duplicate Request', 'Invalid DM Request'}>}[DM Case Count])/SUM ([Open Count]),0)

Or

RangeAvg(SUM ({$<[Closure Code] -= {'Duplicate Request', 'Invalid DM Request'}>}[DM Case Count])/SUM ([Open Count]),Avg(1))


Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

1 Reply
Anil_Babu_Samineni

How about this?

RangeAvg(SUM ({$<[Closure Code] -= {'Duplicate Request', 'Invalid DM Request'}>}[DM Case Count])/SUM ([Open Count]),0)

Or

RangeAvg(SUM ({$<[Closure Code] -= {'Duplicate Request', 'Invalid DM Request'}>}[DM Case Count])/SUM ([Open Count]),Avg(1))


Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful