Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
gjamila_esq
Creator
Creator

Pivot table avg

Hi,

using a pivot table I have this situation:

CatturaPivot.JPG

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!

1 Solution

Accepted Solutions
Not applicable

you need to change expression from sum to avg

View solution in original post

12 Replies
Not applicable

try this:

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

gjamila_esq
Creator
Creator
Author

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...

Not applicable

you can try range avg function

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

gjamila_esq
Creator
Creator
Author

Thank you Pari Pari, the qvw is attached below.

Not applicable

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)

Not applicable

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

Bye marchetto

gjamila_esq
Creator
Creator
Author

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 😉

CatturaPivot2.JPG

gjamila_esq
Creator
Creator
Author

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

Any suggestion?

Not applicable

take a look at this....

avg.PNG

let's start from the beginning:)

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