Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
m14cus
Starting Member
2 Posts |
Posted - 2010-09-30 : 13:45:29
|
I have a table that contains order data and I'm trying to return the sum of 'ORDER_TOT' . I've tried to use distinct(ORDER_TOT) but it stil sums up all the ord_tot for each order_num. i.e returns 15 and not 5I'm new to MDX and although found a few similar examples I can't find an answer.Any help would be very gratefully receivedExample DataORDER_NUM SKU ITEM_AMT ORDER_TOT001 ABC123 1.00 5.00001 CDE001 2.50 5.00001 FGH003 1.50 5.00 Example code I've tried SELECT [Measures].[Order Total Amount] ON COLUMNS ,NON EMPTY [OrderNumber].[Order Number].MEMBERS ON ROWSFROM TJXSELECT distinct([Measures].[Order Total Amount]) ON COLUMNS ,NON EMPTY [OrderNumber].[Order Number].MEMBERS ON ROWSFROM TJX |
|
|
|
|