Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
allan_vittrup
Partner - Contributor III
Partner - Contributor III

Straight Table Getting all values except current line at aggregated level

Hi.

In a straight table I need to get the total revenue for each supplier, where the revenue is NOT generated for the current supplier for the current Doc.

In the final table, only the Supplier dimension is supposed to be there.

Note that, for Doc 3810 the result should be 0, because on that Doc there where to other suppliers.

Below is the sample data both in image and table form.

I need to go from this:                                                                               to This:

From_001.pngTo.png

In table form:

From:

   

DocSupplierRevenue
3810Diverse2755
3813Nike350
3813Craft550
3813Aqualung200
3813Sports

200


To:

   

SupplierRevenueRevenue Not cur Supplier
4055
Diverse27550
Aqualung2001100
Craft550750
Nike350950
Sports2001100

I am assuming that I need some sum(aggr()) combined with a TOTAL but I haven't been able to create the correct expression.

Can anyone help?

1 Solution

Accepted Solutions
sunny_talwar

May be this

Sum(Aggr(Sum(TOTAL <Doc> Revenue) - Sum(Revenue), Doc, Supplier))


Capture.PNG

View solution in original post

4 Replies
mayankraoka
Specialist
Specialist

Can you please attached sample qvw.

Regards,

Mayank

vishsaggi
Champion III
Champion III

Why supplier Aqualung and Sports should get 1100?

sunny_talwar

May be this

Sum(Aggr(Sum(TOTAL <Doc> Revenue) - Sum(Revenue), Doc, Supplier))


Capture.PNG

allan_vittrup
Partner - Contributor III
Partner - Contributor III
Author

Hi Sunny.

Exactly what I was looking for.

Thank you very much