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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
brf10043
Creator
Creator

Aver Expression

Stupid question.

How do I write an average expression for this?

This expression gets me the run line.  Now I need an average.  I can't seem to get this worked out for some reason.

if(Support_Commitment='SCV Not Available',avg(distinct TOTAL_OUTAGE_DURATION_HOURS),(sum(TotalWSC)+sum(TotalOSC)))

Labels (1)
1 Solution

Accepted Solutions
Anil_Babu_Samineni
MVP
MVP

If you want on top of Average, You can define like

Avg({<Support_Commitment = {"SCV Not Available"}>} Aggr(if(Support_Commitment='SCV Not Available',avg(distinct TOTAL_OUTAGE_DURATION_HOURS),(sum(TotalWSC)+sum(TotalOSC))), ChartDim1, ChartDim2))

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

2 Replies
sunny_talwar
MVP
MVP

Do you have Support_Commitment as one of the dimensions in the chart where you are using the above expression?

Anil_Babu_Samineni
MVP
MVP

If you want on top of Average, You can define like

Avg({<Support_Commitment = {"SCV Not Available"}>} Aggr(if(Support_Commitment='SCV Not Available',avg(distinct TOTAL_OUTAGE_DURATION_HOURS),(sum(TotalWSC)+sum(TotalOSC))), ChartDim1, ChartDim2))

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