12 Replies Latest reply: Aug 30, 2012 6:35 AM by Giorgia Michieli

# Pivot table avg

Hi,

using a pivot table I have this situation:

so I have total for both columns: I wouldn't have total for the second one but the average of the percentage.

Can I do it? How?

Thank you!

• ###### Re: Pivot table avg

try this:

if(rowno()=0, expressionyyy, expressionxxx)

• ###### Re: Pivot table avg

Pari Pari ha scritto:

try this:

if(rowno()=0, expressionyyy, expressionxxx)

I tried

if(rowno()=0, avg(VEN_PERC_SCONTO2)/100, sum(VEN_PERC_SCONTO2)/100)

but doesn't work...

• ###### Re: Pivot table avg

you can try range avg function

it will be easier if you post a small sample file:)

• ###### Re: Pivot table avg

Thank you Pari Pari, the qvw is attached below.

• ###### Re: Pivot table avg

can you explain why

if(rowno()=0, avg(VEN_PERC_SCONTO2)/100, sum(VEN_PERC_SCONTO2)/100)

doesn't work? IMO works fine (see att qvw file)

• ###### Re: Pivot table avg

YOU must be use for modify a total the function dimensionality().

Bye marchetto

• ###### Re: Pivot table avg

Thank you Marchetto, I also tried to use dimensionality(), but I'm not able to make it work.

Any suggestion?

• ###### Re: Pivot table avg

Pari Pari ha scritto:

can you explain why

if(rowno()=0, avg(VEN_PERC_SCONTO2)/100, sum(VEN_PERC_SCONTO2)/100)

doesn't work? IMO works fine (see att qvw file)

It doesn't work fine... (5+5+10)/3=6,67, not 5 ;-)

• ###### Re: Pivot table avg

take a look at this....

let's start from the beginning:)

what you want to achieve in this selection (presented on attached screen)?

• ###### Re: Pivot table avg

You are right!

Why when I reduce everything it makes total af percentage?

Is there any way to not do so?

• ###### Re: Pivot table avg

you need to change expression from sum to avg

• ###### Re: Pivot table avg

Wonderful!!

I think I've tried everything but I was not convinced ... I did not grant that there were multiple lines articolo!

Thank you so much, I just learned something new!