Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

zagzebski
Contributor

Dimension label in chart

this seems like it should be simple but having a hard time finding the answer...

I have a line chart with time dimension on X - Axis and Amount of Sales on Y-Axis. The product dimension is what is plotted on the line chart. All I want is to have the name of the Product plotted on top of the line in the graph. for instance we have product Shoes being plotted in the graph how can I get the name "Shoes" on the graph (not just in the legend).

Thanks in advance for help...

1 Solution

Accepted Solutions

Re: Dimension label in chart

It is working for me.

Why it is not working for you.

See attached.

6 Replies
mov
Esteemed Contributor III

Re: Dimension label in chart

Line charts a mostly for timelines, I'd recommend bar chart with horizontal bars.  Anyway, there is a solution for you.

If your dimension is Product, and expression is sum(amount), change expression to

dual(Product, sum(amount))

In number format settings, use Expression Default.

Regards,

Michael

zagzebski
Contributor

Re: Dimension label in chart

Michael - It comes back with "No data to display".

Chart info :

Type:Line Chart

Dimensions : Incurred Year/Month, Product

Expression:  dual([Product],sum([Sales])

Number: Expression default

mov
Esteemed Contributor III

Re: Dimension label in chart

Oh, I thought you had only one dimension, Product.  Sisnce oyu have Year/Month, line chart makes sense.  In any case, I don't understand why you get this error.  You should've got correct chart but with Product label on each data point.  Not what you need anyway.  The sollution you're looking for is closer to what Gysbert suggests - leave your major expression as is, without dual, and add another expression with dual only for the labels at the beginning of each line.

Regards,

Michael

zagzebski
Contributor

Re: Dimension label in chart

I am getting close - if I select only one product it will put the label name on the line. However I want all products to show but if I don't select a specfic product it just adds them all together with one line (and no label of course)

Line Chart

Dimensions Incurrred Year Month, Product

Expression1: sum(sales)

Expression2: dual([Product-Name],sum([Member Count]))

I didnt add the if statement on Expression 2 as I don't mind the label showing all the way across the line.

do you know why I am having an issue showing of not showing all the products individual lines from chart selections above?

Re: Dimension label in chart

It is working for me.

Why it is not working for you.

See attached.

zagzebski
Contributor

Re: Dimension label in chart

Got it thanks! I had "line" checked in my expression area for the dual expression. Needed to be unchecked.

Community Browser