Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
I have 2 tables that are linked with ProductCodes
table 1
ProductCode | DateReceived | AmountReceived |
---|---|---|
1 | 01/01/2013 | 10 |
2 | 20/02/2014 | 15 |
2 | 12/03/2014 | 20 |
...
table 2
ProductCode | DateSold | AmountSold |
---|---|---|
1 | 02/01/2013 | 50 |
2 | 30/01/2013 | 60 |
3 | 10/05/2014 | 70 |
...
I want to have 2 grahs: first graph showing the total amount by month (i also have a product selection box on the side if you want to have a look at a particular product)
THere is also 2 list boxes with dates (1 for the years and one for the month)
Year(DateRecived) as year
Month(DataReceived) as Month
This is fairly basic so far
Thing is I want a second graph with total amountSold by month and I want to show the data that is corresponding to both the product selction (if any) - this works- but also based on the dates selection that the user would choose- this does not work
the dimensions in the 2 graphs are different : respectively month(DateReceived) and month(DateSold) and I am not sure how to "link" them.
Thank you for your help
Hi,
Try like this
Data:
LOAD
*,
'Received' AS Flag,
DateReceived AS Date,
Year(DateReceived) AS Year,
Month(DateReceived) AS Month
FROM DataSource1;
Concatenate(Data)
LOAD
*,
DateSold AS Date,
'Sold' AS Flag,
Year(DateSold) AS Year,
Month(DateSold) AS Month
FROM DataSource2;
Now use ProductCode, Month and Year as filters and use
Sum(AmountReceived) for Amount Received
Sum(AmountSold) for Amount Sold
Regards,
Jagan.
Dear Jagan,
Are you suggesting to concatenate?
If so I would like to avoid doing that as I am dealing with a lot of data and multiple tables (more than 2)
Is there another solution
One would be to have 2 selection boxes fr the dates (one for DateReceived and another one for the DateSold) but this is not user firendly.
Cheers
HI,
If you are not ok with concatenate then try to use Link table, so that you can use single list box for selections.
Regards,
Jagan.