Forum Discussion
Marcox28
Helper II
8 years agoSUM SALES WITH PROMO
I have a problem in calculating sales made with receipts with at least one product being promoted. my sales table is TVE_ID TVE_IdArticolo TVE_Price TVE_CodicePromozione TVE_IDScontri...
parry2k
Super User
8 years agoSeeme like somethign else is going on, I tested it on my end with sample data and it worked fine.
Anonymous
8 years agoNot applicable
Did you get 129.24 ?
Here's the code:
Promotional sales =
CALCULATE (
SUM ( SalesTable[PRICE] ),
SUMMARIZE (
FILTER ( SalesTable, NOT ISBLANK ( SalesTable[TVE_CodicePromozione] ) ),
SalesTable[TVE_IDScontrino]
)
)
Here is the result: It only pulls in the four rows with the PromoID
| TVE_ID | Promotional sales | PRICE |
| 1 | 3.95 | 3.95 |
| 2 | 2.03 | |
| 3 | 0.1 | |
| 4 | 27.99 | |
| 5 | 27.99 | |
| 6 | 27.99 | |
| 7 | 27.99 | |
| 8 | 27.99 | 27.99 |
| 9 | 0.1 | |
| 10 | 2.99 | |
| 11 | 2.99 | |
| 12 | 2.99 | |
| 13 | 2.49 | |
| 14 | 3.59 | |
| 15 | 0.19 | |
| 16 | 23.92 | |
| 17 | 3.85 | |
| 18 | 6.47 | 6.47 |
| 19 | 2.03 | |
| 20 | 2.03 | |
| 21 | 2.03 | |
| 22 | 2.73 | |
| 23 | 2.79 | |
| 24 | 14.97 | 14.97 |
| 25 | 19.95 |