Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Display Avg Value in Total

Hi Everyone,

I have to show Each Items Avg Value in the pivot table liked shown below.

ItemNoQuantityRateTax
ActualValueTotal Cost
I0011090101001000
I00115135151502250
I0011090101001000
I00115135151502250
Total5045050500(6500/50) = 130

How to show this?

Thanks

1 Solution

Accepted Solutions
whiteline
Master II
Master II

Hi.

You can use dimensionality() function to override a calculation of Total Cost for Total row:

=if(dimensionality()=0, Sum(Sum(aggr(ActualValue*Quantity, ItemNo)))/Sum(Quantity), Sum(ActualValue*Quantity))

View solution in original post

7 Replies
Not applicable
Author

In the example I used the expression:

Actual Value: Sum(Rate + Tax)

Avg Value: Sum((Rate+Tax)*Quantity)/Sum(Quantity)

AvgValue.jpg

Attached file for ur reference.

whiteline
Master II
Master II

Hi.

You can use dimensionality() function to override a calculation of Total Cost for Total row:

=if(dimensionality()=0, Sum(Sum(aggr(ActualValue*Quantity, ItemNo)))/Sum(Quantity), Sum(ActualValue*Quantity))

Not applicable
Author

Hi The Hulk,

What if I have  to show all the rows for ItemNo=I001.

Is this expression works ?

e.g. each row contains different EntryNo.

Thanks.

Not applicable
Author

Sure, in this case you have to intorduce the new dimension.

AvgValue2.jpg

Not applicable
Author

Hi The Hulk,

Thanks for reply.Even I tried.Its working correctly.

Thanks once again,

Not applicable
Author

Hi Whilteline,

Thanks for your reply..I marked your answered as correct because..Use of Dimensionality() is important to show two different calcalation in one column.

Thanks once again.

whiteline
Master II
Master II

I understand

You're welcome.