Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a data modell like this:
direction values here: in or out
amount: values here numbers
date: values here ...
I would like to make an accumulated line chart (succeeded) which represents the incomes and expenses, and colored the two line with an expression (not succeeded).
Dimension: date
Measures:
RangeSum(Above(Sum({<direction={'in'}>}amount),0,RowNo())) and
RangeSum(Above(Sum({<direction={'out'}>}amount),0,RowNo()))
Coloring:
Color and legend / Colors by expression: if(direction='in',lightred(),lightgreen()).
Please help me how can I set up the colors with expression for the lines.
qvf, pic and data are attached.
Thanks,
Daniel
Would you be able to point out what is wrong with the image you have attached? What do you expect to see?
Hi Sunny, I have two lines as you can see in the picture, one is representing income and the other is representing the loss, i would like to coloring the 1st to green 2nd to red.
I guess Qlik Sense isn't allowing us to do that. You can have them in two different colors, but it doesn't let you pick the colors.
It has this feature, check this post color by expression - QlikSense
and this comment jpe Aug 25, 2014 1:13 PM (in response to Philipp Wesseling).
I think in there case Year was one of the dimensions whereas in your case direction is not one of the dimensions..... I tried with two dimension and a single expression, but the charts don't match. But check it out for urself if it makes sense to use this
it is bad that Sense doesn't use the logic what View has (color option in each expression) but thanks Sunny for your effort.
I will keep open the post maybe somebody has another suggestion...
Regards,
Daniel