Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
sibideepak
Creator II
Creator II

is it possible to compare two dimensions value ??

Hi ,

Say for example if hav bar chart with month as dimension

and sales as measures ..

I want to compare sales each month with previous month and

change color (for example green,red)...

help me.

Thanks in advance,

Deepak Sibi

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try like:

=If(Above(Sum(Measure))>Sum(Measure), Green(), Red())            // background color expression

Similarly you can use Below() as well.

See attached sample too.

View solution in original post

6 Replies
tresesco
MVP
MVP

Try like:

=If(Above(Sum(Measure))>Sum(Measure), Green(), Red())            // background color expression

Similarly you can use Below() as well.

See attached sample too.

View solution in original post

sibideepak
Creator II
Creator II
Author

Thanks tresesco ,

Its working..

Actually i dont understand how it works ..

can you explain a bit ..??

And another doubt .. it s not properly working on line chart...

i.e) if line moves down it should appear red .

tresesco
MVP
MVP

Above() - as the name says - it gets the value(expression here) of the earlier row. Then, rest part is simple comparison might not require explanation. For details, please refer help or reference manual.

sibideepak
Creator II
Creator II
Author

And while applying  it s not properly working on line chart...

i.e) if line moves down it should appear red .but not

tresesco
MVP
MVP

Try to share your qvw with sample data. See: Preparing examples for Upload - Reduction and D... | Qlik Community

sibideepak
Creator II
Creator II
Author

Thanks ,

I tried and it works