Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

avg

hi,

i made formule in pivot & chart like this avg(if,than.if(than, if(than,else),else))...

the resolt in the line is O.K. but in sum the resolt is not good

exm:

resolt line 1 - 4

resolt line 2 - 17

resolt line 3 - 7


in the sum line it's show 4 !!

what can be the problem ?


thanks'

yarin

5 Replies
lironbaram
Partner - Master III
Partner - Master III

hi

the problem is that

qlikview evaluates the formula for the total field also and apparently it answers the first condition

you'll need to use this as your expression

sum(aggr( avg(if,than.if(than, if(than,else),else)),YourDimensions))

Anonymous
Not applicable
Author

Hi

Can you post your expression for Sum

Thanks

PrashantSangle

Hi,

Can you post screen shot of your chart???

Try aggr()

try like avg(aggr(YourExpression,dim))

Regads

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
HirisH_V7
Master
Master

Hi ,

I hope ,

In your expression ,

(if,than.if(than, if(than,else) Its fine but you have to aggr for the final else with your dimensions,


Can you post your sample if possible,


-Hirish

HirisH
“Aspire to Inspire before we Expire!”
yevgeniy
Creator
Creator

Hi,

avg(aggr(avg(if,than.if(than, if(than,else),else)),  your dimention fields1,your dimention field2....))