Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlik Sense: Line chart with multiple lines

Hi,

I'm trying to create a line chart with three lines. Two of the lines are based on a Dimension {Manual registered, Automatic registered} and the third should be the share of the two (ex 75% av Automatic registered), all three lines plotted over time (X-axis).

X-axis I would like to have the date

Y-axis I would like to have a count of the invoices

My data is in the following format

InvoiceHeadIDRegisterTypeArrivalDate
123456Manual2016-01-01
123457Manual2016-01-01
123458Automatic2016-01-02
...........

I have created a dimension of the field RegisterType and the field ArrivalDatet

My measure is Count(InvoiceHeadID).

However, I cant even get the basic to work, my line chart shows only one line, it does not seem to like my Dimension of RegisterType.

According to the used data the share should be around 75%, and the two lines should therefore be shown, but only one is where it should be, the other once is down by the X-axis and I cant understand why.

4 Replies
rubenmarin

Hi Niklas, just guessing but maybe there are many records for each manual HeadID and not for automatic, if this is the case you can try adding distinct:

Count(distinct InvoiceHeadID)


To retrieve in %:

Count(distinct InvoiceHeadID)/Count(distinct total <ArrivalDate> InvoiceHeadID)

Not applicable
Author

Hi Ruben,

Thank you for the quick reply. However It did not work even though i altered the measurement according to your description

Is there any way I could provide additional information (code perhaps) that would be of any help?

Regards, Niclas

Not applicable
Author

Hi again,

I just got it to work. I had chose the wrong dimension for Arrivaldate, when I selected the Arrivaldate.date as dimension it worked as a charm! Now I have to understand why that is...

rubenmarin

If you selected a different field as dimension an it worked most probably is something about the relationships between data, the field used before can be in another table where relationship with count is not clear... Hard to say without taking a look at the or a sample at least.