# New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Highlighted
New Contributor II

## Total of Average Count in Straight Table

Hi All,

I have straight table with Expression :

EA New = AVG(Aggr(Count({[Item New] <[Fact Flag]={'Sales'}>} DISTINCT [Customer SO Group Area]), [Month Name], [Customer Area SI]))

RO Target = Count({[Item Target] <[Fact Flag]={'Sales'}>} DISTINCT [Customer SO Group Area])

But i'm getting different Total [EA New]/[RO Target]. How can i get Total [EA New]/[RO Target] like in "Yellow"?

And also how can i set background colour of [EA New]/[RO Target] to "Red" if [EA New]/[RO Target] < TOTAL [EA New]/[RO Target]?

I also attach my qvw.

1 Solution

Accepted Solutions
MVP

## Re: Total of Average Count in Straight Table

How are you getting 57.75%? Avg of the cells in red? Why including the Null cell (D3)? I got 35.40%, does that look right?

5 Replies
MVP

## Re: Total of Average Count in Straight Table

How are you getting 57.75%? Avg of the cells in red? Why including the Null cell (D3)? I got 35.40%, does that look right?

New Contributor II

## Re: Total of Average Count in Straight Table

Thanks a lot Sunny for your help

With a little modification expression you gave, i can get result like i want

MVP

## Re: Total of Average Count in Straight Table

Awesome, I am glad you were able to make this work. Would you be able to point out what did you do differently to get the right output?

New Contributor II

## Re: Total of Average Count in Straight Table

Hi Sunny, i hope i can explain well.

This is your expression [EA New]/[RO Target] :

And this is my expression after modification [EA New]/[RO Target] :

I'm using your expression in yellow and the green. And for your expression in pink i change into Count Total without Sum Total Aggr.

And for Red background color this is my expression :

Thank you

MVP

## Re: Total of Average Count in Straight Table

Super, thanks for sharing this. I am glad that you played around with the expression to fine tune it based on your requirement.

Best,

Sunny