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

Ignoring specific data while summing

Hey guys, thanks in advance for any help and/or advice.

I am trying to sum our sales data, where some items are not included in the overall tracked sales because it is raw material.

Below is some dummy data. So what I am asking is how do I ignore "Part D" in the summation of the items sold. What I want is for that totaled number to be 14 NOT 15.

The hitch, is that I still want the item to still be displayed, otherwise I would just define a restriction in the Load statement.

ITEM     ITEM NUM      QUANTITY     PRICE     TOTAL

Part A     123               1                    1.00          1.00

Part B     456               2                    2.00          4.00

Part C     789               3                    3.00          9.00

Part D     122               4                    0.25          1.00

                                                                       15.00

1 Solution

Accepted Solutions
sunny_talwar

Try this:

Sum({<ITEM -= {'Part D'}>} Aggr(Sum(Price * Quantity), ITEM))

View solution in original post

5 Replies
sunny_talwar

What is the expression that you are using right now? Only want to exclude Part D from the TOTAL or the row should not appear at all?

shearwatertroy
Contributor III
Contributor III
Author

I want the Data to still show. But I do not want it to be included in the total.

sunny_talwar

Try this:

Sum({<ITEM -= {'Part D'}>} Aggr(Sum(Price * Quantity), ITEM))

shearwatertroy
Contributor III
Contributor III
Author

Perfect! That's exactly what I was looking for!

sunny_talwar

Awesome, I am glad I was able to help