Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
tinkerz1
Creator II
Creator II

Trying to add a line into a stacked bar chart without it unstacking

Hi,

I have attached file showing a stacked bar chart, I would like to add a threshold line based on Product = 'Type A' and Group = 'Group A'.

The expression will carry an IF clause to filter the Product and a List box will cover the selection of Groups.

My issue is when I enable the expression to put a line on the chart, the bars dont stack anymore. How can the line be added without un stacking the data.

The line should be 5.

Thanks

8 Replies
sunny_talwar

Have you tried using Reference Lines on the Presentation tab? You can use Calculated Expression for this line (For the sake of the example, I just used a static number 5)

Capture.PNG

Note: I used a static max of 7 so that the line was visible at 5

ecolomer
Master II
Master II

Is that you need?

p68.png

tinkerz1
Creator II
Creator II
Author

Yes thats what I need, but the Threshold could change every month and I want it to be set from the upload file not from QV.

Thanks

sunny_talwar

Like I mentioned you can use an expression to determine the positioning of the line. Can you elaborate on the calculation that drives the threshold here?

HirisH_V7
Master
Master

Hi,

Check this,

reference line in stacked bar.PNG

HTH,

Hirish

HirisH
“Aspire to Inspire before we Expire!”
rubenmarin

If your regions are somewhat fixed (few regions wich doesn't changes) you can leave only one dimension and create an expression for each of the regions.

With only one dimension you can have your bars stacked and the line as an expression wich can vary.

Not applicable

you would want to create/use an expression as a reference line on the presentation tab - by using an expression isntead of a hard code value, your line will by dynamic, based on the data within the expression

tinkerz1
Creator II
Creator II
Author

OK great I have it now, I will repost my QVD for reference.