# QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
QlikView Fans! We’d love to hear from you.
Rules, plus terms and conditions, can be found here.
New Contributor III

## wrong results on a straight table

Hello,

Could every-body help me to know (see attached file) whitch mistake i make in this straight table.

One élément of a dimension desappears in the average amount.

thank you very much.

Best regards,

Arnault

1 Solution

Accepted Solutions
MVP

## Re: wrong results on a straight table

May be this:

round((Sum({\$<MOIS={"<=\$(=max(MOIS))"},[CANALCOM]={'OUI'}>} (VENTEOJD)) / max(TOTAL MOIS)))

7 Replies
Valued Contributor

## Re: wrong results on a straight table

PFA

Just use the expression total instead of sum of rows.

New Contributor III

## Re: wrong results on a straight table

ok thank you,

but one element (37261 whitch is 192 in november) , has desappeared in the straight table.

do you know why ?

MVP

## Re: wrong results on a straight table

May be this:

round((Sum({\$<MOIS={"<=\$(=max(MOIS))"},[CANALCOM]={'OUI'}>} (VENTEOJD)) / max(TOTAL MOIS)))

New Contributor III

## Re: wrong results on a straight table

yes it is perfect.

just a question : why do i have to add TOTAL here ?

thank you very much

Valued Contributor

## Re: wrong results on a straight table

your expression max(MOIS) returns null for the ID 37261 since it has value in the mois of 11 therefore the 37261 returns'-' and automatically suppressed

you need to to use max(total MOIS) to return 12 or if you want to return 11 which is max(mois) for value 37261 use this exp Max({\$<MOIS={"<=\$(=max(MOIS))"},[CANALCOM]={'OUI'}>}MOIS)

since you need avg for 12 months max(total MOIS) will be your expression

Hope it helps

MVP

## Re: wrong results on a straight table

Max(MOIS) for 37261 was somehow showing as null... changed it to Max(TOTAL MOIS) which calculate Max MOIS across all the INSEE

New Contributor III

Aar, Sunny,