Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
CatoFuglestad
Contributor
Contributor

Linechart with 2 dimensions or measure pr measure

Hi All, Im having trouble creating a line chart the way I want. Can someone please give me a pointer?

  1. Objective:

    • Display a line chart in Qlik Sense.
    • Use the date field (PO_DATE) as the dimension.
    • Display one line (measure) for each supplier that gives the average PO_VALUE per Date group
  2. Data Fields:

    • I have the following relevant fields in your dataset:
      • PO_DATE (Date field)
      • SUPPLIER (Supplier field)
      • PO_VALUE (Purchase Order Value)

The Dimension is given as [PO_DATE.autoCalendar.YearMonth]

one way of achieving what I need is to use the PO_VALUE as the measure combined with an IF statement. =IF(SUPPLIER = 'AAA', AVG(PO_VALUE)) This gives me a nice line in the chart over the date dimension. But there are too many suppliers to having to create one measure for each supplier. Considering no other filters are chosen, over 200 suppliers would be there. Logically for this dashboard, a filter on another field, Part_Number, is used and then only a couple suppliers are matching to be displayed. Depending on what Part Number is chosen, different suppliers will match.

Is there any way we can achieve this chart more easily than creating 200 measures matching each one one supplier with the IF statement?

Labels (1)
1 Solution

Accepted Solutions
vincent_ardiet_
Specialist
Specialist

If you don't see the "Add" button below PO_DATE this is maybe because you have more than a single measure in your object. You should have only one, else this is not possible.

See here one measure, I can add a second dimension:

vincent_ardiet__0-1700653042148.png

Two measures, I can only add an alternative dimension:

vincent_ardiet__1-1700653094915.png

 

View solution in original post

4 Replies
vincent_ardiet_
Specialist
Specialist

If you use PO_DATE as the first dimension (Group) and SUPPLIER as the second dimension (Line), then with your measure AVG(PO_VALUE), you will see one line per supplier.

CatoFuglestad
Contributor
Contributor
Author

Yes that sound easy enough. I have no idea how to add a second dimension or group to the line chart.  I can add an alternative but that does not help me. Can you point me in the right direction?

vincent_ardiet_
Specialist
Specialist

If you don't see the "Add" button below PO_DATE this is maybe because you have more than a single measure in your object. You should have only one, else this is not possible.

See here one measure, I can add a second dimension:

vincent_ardiet__0-1700653042148.png

Two measures, I can only add an alternative dimension:

vincent_ardiet__1-1700653094915.png

 

CatoFuglestad
Contributor
Contributor
Author

Thank you, I understand now! I did have 2 measures still, from testing a lot of different googled solutions. Thanks