# QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Not applicable

## Calculate difference to Total average expression

NameSkillAvg ScoreDifference against total averageAbove/Below
2.82How do I make this column?

Name 1

12.50=2.82-2.50 (Column should show 0.32)Above
Name 223=2.82-3 (Column should show -0.18)Below
Name 313=2.82-3 (Column should show -0.18)Below
Name 422.80=2.82-2.80 (Column should show 0.02)Above

Im struggling on how to calculate the above.

I would also like to know that if I was to add conditions in set analysis i.e. Skill = 1 only if I would have to do it differently.

Best,

Mav

Tags (2)
1 Solution

Accepted Solutions

## Re: Calculate difference to Total average expression

Hi,

Try this..

Expression for Difference against total average=Avg(TOTAL [Avg Score])-[Avg Score]

Expression for Above / Below : =if([Difference against total average]<=0,'Below','Above')

Check the Attachment

2 Replies

## Re: Calculate difference to Total average expression

Hi,

Try this..

Expression for Difference against total average=Avg(TOTAL [Avg Score])-[Avg Score]

Expression for Above / Below : =if([Difference against total average]<=0,'Below','Above')

Check the Attachment

Not applicable

## Re: Calculate difference to Total average expression

You can reference the existing expression names in the new expression in the straight table.

So you can use the expressions suggested by settu.periyasamy

Community Browser