A real life problem guys,
i have a data set that goes like this:
colums - [invoice num] [department num] [date] [item num] [Net charge]
each invoice contains multiple items and so invoice number is repeated for many rows
<tbody>
</tbody>
what i want is to aggregate the Net charge for all invoice containing a even a single item from department num 4
for our example, if invoice 1001 and 1003 have many items , and also items from department 4 , i want the sum, of 1001 and 1003 - so its15+30+6+50
so in fact i want to mark a category by a value in a single row.
at the moument i do this by pivoting invoice and filtering dep 4. i get a list of all invoices containing even 1 row of department 4. i create a new table in power pivot and create a relationship and than i have a category of invoices that are "marked"
i can than sum these marked invoices , this could be done automatic if i could pivot a pivot table, but i cant
is there a straightforward way of doing this kind of "marking" ?
i have a data set that goes like this:
colums - [invoice num] [department num] [date] [item num] [Net charge]
each invoice contains multiple items and so invoice number is repeated for many rows
invoice | deparment | item num | net charge |
1000 | 1 | fdd | 30 |
1000 | 6 | g | 1 |
1000 | 2 | ggd | 100 |
1001 | 4 | g | 15 |
1001 | 1 | fdd | 30 |
1002 | 2 | fdd | 20 |
1002 | 5 | g | 50 |
1003 | 4 | h | 6 |
1003 | 8 | 5tt | 50 |
<tbody>
</tbody>
what i want is to aggregate the Net charge for all invoice containing a even a single item from department num 4
for our example, if invoice 1001 and 1003 have many items , and also items from department 4 , i want the sum, of 1001 and 1003 - so its15+30+6+50
so in fact i want to mark a category by a value in a single row.
at the moument i do this by pivoting invoice and filtering dep 4. i get a list of all invoices containing even 1 row of department 4. i create a new table in power pivot and create a relationship and than i have a category of invoices that are "marked"
i can than sum these marked invoices , this could be done automatic if i could pivot a pivot table, but i cant
is there a straightforward way of doing this kind of "marking" ?