Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Calculate column group with condition Expand / Collapse
Author
Message
Posted Monday, February 25, 2013 8:27 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, November 13, 2013 8:16 PM
Points: 21, Visits: 119
I have data
----------------------------------------
Date | region | Type | Value
----------------------------------------
01/01/2013 | Asia | B | 20.00
01/01/2013 | Asia | S | 15.00
01/01/2013 | Europe| B | 82.00
01/01/2013 | Europe| S | 26.00
01/01/2013 | Africa | S | 15.00
02/01/2013 | Asia | B | 10.00
02/01/2013 | Asia | S | 30.00
02/01/2013 | Europe| B | 45.00
02/01/2013 | Europe| S | 55.00
02/01/2013 | Africa | S | 7.00

I user matrix to build report
-------------------------------------------------------------------------------------------------
Date | Asia | Europe | Africa |
|----------------------------------------------------------------------------------|
| B | S | total | B | S | total | S | Total |
--------------------------------------------------------------------------------------------------
01/01/2013 | 20.00 | 15.00 | B-S | 82.00 | 26.00 | B-S | 15.00| B-S |
02/01/2013 | 10.00 | 30.00 | B-S | 45.00 | 55.00 | B-S | 7.00 | B-S |

My Question
1. How can I fix that all type (buy/Sell) have to show in all region column(not show B in Africa)?
2. How can I calculate net value for each region/ each day??

Many Thanks in advance.
Post #1423862
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse