Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Range Sum & Above function working wrong when supress zero values option cheked

Dear All,

we want to add above sum of rows in pivot table so the expression is written as

if(Region=23, RangeSum(above(TOTAL column(1),1,22)), Data)

it's coming correct when suppress zero values is un-checked for Region = 23 as 158

when we check suppress zero values the result  coming wrong for region = 23 as 256

is it bug or please help if any other solution available.

attached qvw file for your reference.

  

Region qty
11
22
3-
4-
55
66
7-
8-
9-
1010
1111
1212
1313
14-
15-
16-
1717
1818
19-
2020
2121
2222
23158
2424
2525

  

Region qty
11
22
55
66
1010
1111
1212
1313
1717
1818
2020
2121
2222
23256
2424
2525

Thanks in advance.

18 Replies
maxgro
MVP
MVP

maybe

if(Region=23, RangeSum(above( sum(qty),1,rowno()-1)), sum(qty))

MK_QSL
MVP
MVP

use this....

if(Region=23,RangeSum(above(TOTAL SUM(Data),1,RowNo())),Data)

johnw
Champion III
Champion III

I'm unclear why it isn't working, but it seems to be confused by the use of column(1) once you get to a certain point farther up in the chart. But if you instead use Data (or I'd guess whatever expression you use when not 23), it works.

if(Region=23,rangesum(above(Data,1,22)),Data)

I don't know if that will work for your real data model and chart, but perhaps it would.

sunny_talwar

I think no matter how hard you try, it will be difficult for you to use Column() function to achieve what you are looking to get. I did try to steer you towards use of variables? Did it not pan out for you or did you never even give it a shot?

above rows total problem in pivot table

Not applicable
Author

used but same problem

MK_QSL
MVP
MVP

I am sure anyone from these answers would work. But if you are trying these solutions in real data which are too different from the sample provided, no one can help you further without getting more information.

When you said,, used but same problem... what you mean to say? Can you please provide some more information..?

Not applicable
Author

Dear All

please forget about my real development just i tried with simple excel data by reloading and designed pivot table

by writing simple expression as below by adding dimension as Region

if(Region=23, RangeSum(above(TOTAL column(1),1,22)), Data)

or

if(Region=23, RangeSum(above(TOTAL column(1),1, ROwNo()-1)), Data)


its giving correct total when properties -- > suppress zero values un-check

its giving wrong total when properties -- > suppress zero values checked

request you people to try the same then you will understand the problem

actually unfortunately i am unable to attach actual QVW file due to am not able to view @attache option in my browser.

Excel Data As Follows :

  

RegionData
11
22
33
44
55
66
77
88
99
1010
1111
1212
1313
1414
1515
1616
1717
1818
1919
2020
2121
2222
2323
2424
2525

Thanks ....

Not applicable
Author

Dear All

please forget about my real development just i tried with simple excel data by reloading and designed pivot table

by writing simple expression as below by adding dimension as Region

if(Region=23, RangeSum(above(TOTAL column(1),1,22)), Data)

or

if(Region=23, RangeSum(above(TOTAL column(1),1, ROwNo()-1)), Data)


its giving correct total when properties -- > suppress zero values un-check

its giving wrong total when properties -- > suppress zero values checked

request you people to try the same then you will understand the problem

actually unfortunately i am unable to attach actual QVW file due to am not able to view @attache option in my browser.

Excel Data As Follows :

  

RegionData
11
22
33
44
55
66
77
88
99
1010
1111
1212
1313
1414
1515
1616
1717
1818
1919
2020
2121
2222
2323
2424
2525

Thanks ....

MK_QSL
MVP
MVP

as already replied... you can't use Column(1) here.. use SUM(Data) instead..