Hello,
My cube has following data
Order no | Order type | Special order | Net Value | Order date |
---|---|---|---|---|
1000 | B1 | Y | 2000 | 10.11.2014 |
1000 | B2 | Y | -2500 | 12.11.2014 |
1001 | B1 | Y | 3000 | 11.11.2014 |
1001 | B2 | Y | -3500 | 13.11.2014 |
1001 | B2 | Y | -5000 | 12.11.2014 |
1000 | B1 | Y | -4000 | 11.11.2014 |
For all special orders and within specified range of order date (Input in query), total count of orders need to be calculated based on sum of net values for each order type and per order. If Netvalue <0, count order as -1 and if Net value >0, count it as 1.
Input Range: 10.11.2014 to 12.11.2014
Output should be
Order type | Order count |
---|---|
B1 | 0 |
B2 | -2 |
For this range, B1 got 2 orders ideally. For order 1000, count is -1 and for order 1001, count is 1 and hence total count is 0.
Can I do it in query designer? If so please suggest?