Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I'm new to qlik sense and looking for a solution on a tricky(atleast for me) situation.
Basically i have a year dimension and two ID's say Purchased ID and Registered ID. I need to display the count of Purchased ID's in one line and Count of Registered ID's in another line against the same year in a line graph.
I need to combine both the graphs on top into one....which gives me the below one. But, i need to show just two lines say GREEN line for purchased and BLUE for REGISTERED. Not like the one below which i get on selecting 2 dimensions(REG and PUR) and 1 measure(YEAR).
TIA!!
still possible, although a little changed:
[SourceTable]:
SQL
SELECT
RegistrationID,
RegistrationDate,
PurchasedDate
FROM <RegistrationTable>;
[Registrations]:
LOAD
Year(RegistrationDate) AS Year,
RegistrationID
RESIDENT SourceTable;
[Purchases]:
LOAD
Year(PurchasedDate) AS Year,
RegistrationID AS PurchasedID
RESIDENT SourceTable;
DROP TABLE SourceTable;
Looks like you are loading Purchased & Registered separately in your script - if you rename the Year field in both, to the same thing, Qlik will join the two tables.
You can then drop your (new) Year field as the dimension and add Count(PurchasedID) and Count(RegisteredID) as your measures - use a Combo Chart, so you can add more than one measure.
Thanks for the response Andrew.
My bad, probably i didn't explain clearly in my original post.
Basically, i have an RegistrationID which has PurchasedDate and RegisteredDate fields against.
So, to get the count of Purchased Products in a year i do (Count(RegistrationID) ,Year(PurchasedDate))
The same way for Registered Products (Count(RegistrationID), Year(RegisteredDate)).
Best Regards.
still possible, although a little changed:
[SourceTable]:
SQL
SELECT
RegistrationID,
RegistrationDate,
PurchasedDate
FROM <RegistrationTable>;
[Registrations]:
LOAD
Year(RegistrationDate) AS Year,
RegistrationID
RESIDENT SourceTable;
[Purchases]:
LOAD
Year(PurchasedDate) AS Year,
RegistrationID AS PurchasedID
RESIDENT SourceTable;
DROP TABLE SourceTable;
This type of problem is solved here: Canonical Date
Thanks both Andrew and Jonathan.
Andrew's suggestion solved my problem and Jonathan's provided input for another case in the same scenario.
Thanks again!!