Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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_IDScontrino |
1 | 838968 | 3,95 | 444 | 1 |
2 | 854978 | 2,03 | 1 | |
3 | 850875 | 10 | 1 | |
4 | 853576 | 27,99 | 2 | |
5 | 853576 | 27,99 | 2 | |
6 | 810203 | 27,99 | 2 | |
7 | 853576 | 27,99 | 3 | |
8 | 810203 | 27,99 | 444 | 4 |
9 | 849757 | 10 | 4 | |
10 | 838366 | 2,99 | 4 | |
11 | 838366 | 2,99 | 4 | |
12 | 838366 | 2,99 | 5 | |
13 | 855144 | 2,49 | 5 | |
14 | 822673 | 3,59 | 5 | |
15 | 835175 | 19 | 5 | |
16 | 836634 | 23,92 | 5 | |
17 | 834261 | 38,5 | 6 | |
18 | 834308 | 6,47 | 444 | 7 |
19 | 854963 | 2,03 | 8 | |
20 | 854966 | 2,03 | 8 | |
21 | 854967 | 2,03 | 8 | |
22 | 854960 | 2,73 | 8 | |
23 | 847837 | 27,9 | 9 | |
24 | 834330 | 14,97 | 444 | 9 |
25 | 815823 | 19,95 | 9 |
where is it
TVE_ID indicates sales line ID
TVE_price indicates the selling price
TVE_codicepromo indicates the code of the promotion
TVE_IDScontrino indicates the receipt number.
How can I calculate the sum of all receipts that contain at least one product in promotion 444?
I expect this result to come: promotional sales = 129.24
because it sum the following sales line
TVE_ID | TVE_IdArticolo | TVE_Price | TVE_CodicePromozione | TVE_IDScontrino |
1 | 838968 | 3,95 | 444 | 1 |
2 | 854978 | 2,03 | 1 | |
3 | 850875 | 10 | 1 | |
8 | 810203 | 27,99 | 444 | 4 |
9 | 849757 | 10 | 4 | |
10 | 838366 | 2,99 | 4 | |
11 | 838366 | 2,99 | 4 | |
18 | 834308 | 6,47 | 444 | 7 |
23 | 847837 | 27,9 | 9 | |
24 | 834330 | 14,97 | 444 | 9 |
25 | 815823 | 19,95 | 9 |
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
99 | |
75 | |
73 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |