Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
undergrinder
Specialist II
Specialist II

Coloring line chart by two dimension

Hi All,

Is it possible to coloring line chart by two dimension?

First dimension:      Date

Second dimension: Product

+Measure:               Count(Sales)

The data are facts and prediction as well.

I would like to color the prediction gray, product1 facts blue, product2 facts red.

Névtelen.png

I know it is aplicable by one dimension (Date), and with 4 measure, but it will be more elegant.

The color by expression like  if(date>Date_prediction_dt,lightgray(),if(dim1='product1',blue(),red())

Thanks!

G.

7 Replies
robert_mika
Master III
Master III

If you could not find the easy way you can always create two objects (graphs) and put one on another make some colors transparent or hide.

Feeling Qlikngry?

How To /Missing Manual(23 articles)

Not applicable

You could have four measures in the Expressions tab.  First two measures show actuals.  Second two show predictions.  First two stop showing data when the facts run out and the second two starting showing data when the facts run out.

You can disable the second lines from showing up on the legend by unchecking the "Expressions as legend" box at the bottom of the Expressions tab.

MarcoWedel

Hi,

one solution could be:

QlikCommunity_Thread_195832_Pic1.JPG

QlikCommunity_Thread_195832_Pic2.JPG

QlikCommunity_Thread_195832_Pic3.JPG

QlikCommunity_Thread_195832_Pic4.JPG

QlikCommunity_Thread_195832_Pic5.JPG

hope this helps

regards

Marco

undergrinder
Specialist II
Specialist II
Author

Thank You all!

I'm sorry I haven't mentioned, but I use Qlik Sense 1.1, not QlikView.

I thought this topic is all about Sense, therefore I forget.

@Martin: Thank you, I've already tried it, it works, but I look a more beuty solution, like color by expression.

@Marco: Thank you, nice solution, but it isn't suitable because of Sense.

@Robert: I don't get it exactly, what you mean.

G.

robert_mika
Master III
Master III

Sense 1.1?

Any reason why you do not change for 2.0?

My solution is for View you can not have overlapping objects in Sense

Still I like your solution Marco.

Not applicable

Hi,

Why can't we try by defining the calculated colours in the colors tab..

Colors_Tab.JPG

undergrinder
Specialist II
Specialist II
Author

Hi Robert,

It is hard to explain why we still use Qlik Sense 1.1, but I have to working with it.

G.