Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Customers, Partners & Luminaries only: You're invited to a Data Analytics Roadmap session. Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Color By Expression

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

6 Replies
Highlighted

Would you be able to point out what is wrong with the image you have attached? What do you expect to see?

Highlighted
Not applicable

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.

Highlighted

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.

Capture.PNG

Not applicable

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).



Highlighted

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

Capture.PNG

Highlighted
Not applicable

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