Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
im new to qliksense dev and looking for some advice.
i need to create a line chart with 2 lines, the measure is a count of the ID's per week and i have a alternative dimension called "Shift"
sample of my data set:
ID | Wk | WkSupply | Shift |
140 | 15 | 15 | Days |
166 | 15 | 15 | Nights |
144 | 15 | 16 | Days |
230 | 15 | 15 | Evening |
369 | 15 | 16 | Days |
985 | 16 | 16 | Evening |
111 | 16 | 16 | Nights |
874 | 16 | 17 | Days |
444 | 16 | 14 | Nights |
so i would like a simple line chart where my x -axis would be the weeks in the calendar (i can pull in a calendar table for this if needed). then Y axis would be the ID count. then have two lines, one for the count of the ID of the "wk" field, and another for the "WkSupply" field, so the user can see the existing vs supply difference.
im sure this is simple and ive tried playing around with the dimensions but i cant seem to get it right.
any help would be appreciated thank you
Hi @david145
In order to have the two different fields as the dimension you will need to first put them into one field.
You can do this by loading the table twice and concatenating:
Supply:
LOAD
ID,
Wk,
Shift
FROM [lib://DataFile/YourDataFile.qvd] (qvd);
CONCATENATE(Supply)
LOAD
ID as [Supply ID],
WkSupply as Wk,
Shift
FROM [lib://DataFile/YourDataFile.qvd] (qvd);
Once you have this loaded you can create a line chart that has the dimension of Wk and two measures, one being count(DISTINCT ID) and the other being count(DISTINCT [Supply Id]).
This will give you the IDs against the two Wk dimensions as two separate lines.
Hope that makes sense and helps?
Steve
Hi @david145
In order to have the two different fields as the dimension you will need to first put them into one field.
You can do this by loading the table twice and concatenating:
Supply:
LOAD
ID,
Wk,
Shift
FROM [lib://DataFile/YourDataFile.qvd] (qvd);
CONCATENATE(Supply)
LOAD
ID as [Supply ID],
WkSupply as Wk,
Shift
FROM [lib://DataFile/YourDataFile.qvd] (qvd);
Once you have this loaded you can create a line chart that has the dimension of Wk and two measures, one being count(DISTINCT ID) and the other being count(DISTINCT [Supply Id]).
This will give you the IDs against the two Wk dimensions as two separate lines.
Hope that makes sense and helps?
Steve
this works a charm, exactly what i needed thank you Steve
Glad it worked, thanks for marking it as a solution and helping other Community users.
Steve