Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8852

If an order line has multiple deals then my summary total is incorrect

$
0
0

I have a situation where an order has multiple items and these items may have multiple deals attached to it.  Right now my join is creating multiple lines and the totals on Qty and Sales are incorrect

 

Order:          Item          Qty     DealNo                                     DiscountAmt           Price       Sales

111              A                 1       EmployeeDiscount 10%          1.00                         10.00       10

111              A                 1       Monthly Promo        20%         2.00                         10.00       10

 

Total                                2                                                          3                                            20.00

 

It should look like this:

Order:          Item          Qty     DealNo                                     DiscountAmt           Price     sales

111              A                 1       EmployeeDiscount 10%          1.00                         10.00      10

111              A                 1       Monthly Promo 20%                2.00                         10.00      10

 

 

Total                               1                                                        3                                            10




Or perhaps CrossTab will look cleaner?


Thanks.


Viewing all articles
Browse latest Browse all 8852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>