Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
choy
Contributor II
Contributor II

Average of Alternative state and condition

Hi All,

Im doing the comparative analysis for alternative state A and B.

Previously , it work for Avg({A}[Value]) and Avg({B}[Value])

But now I found out there are -1 value, so I need to exclude them and do average.

I used  below syntax, while it returned the same result for A and B.

Could anyone help on this?

Avg({A}{<[Value]=-{'-1'}>} [Value])

Avg({B}{<[Value]=-{'-1'}>} [Value])

Labels (4)
1 Reply
sidhiq91
Specialist II
Specialist II

@choy Your expression should look like below:

Sum({[StateB] <Year={"1997"}> }LineSalesAmount)

in your case,

Avg({[A]< [Value]=-{'-1'}>} [Value])

If this resolves your issue, please like and accept it as a solution.