Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

2 graphs with different set of data and one date select field

Dear all,

I have 2 tables that are linked with ProductCodes

table 1

ProductCodeDateReceivedAmountReceived
1

01/01/2013

10
220/02/201415
212/03/201420

...

table 2

ProductCodeDateSoldAmountSold
102/01/201350
230/01/201360
310/05/201470

...

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

3 Replies
jagan
Partner - Champion III
Partner - Champion III

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.

Not applicable
Author

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

jagan
Partner - Champion III
Partner - Champion III

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.