Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Do More with Qlik - for Beginners and Beyond, Topic: Qlik Replicate on January 21, 2PM EST. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
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
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

Creator II
Creator II

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 .

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.

Creator II
Creator II

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

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

MVP
MVP

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

Creator II
Creator II

Thanks ,

I tried and it works