Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
alkesh_sharma
Creator III
Creator III

Different Color for a Particular value of a dimension

Hyi,

I have created age buckets in the front end based on the basis of due date.

The buckets are like Not Due, 0-30, 30-60, 60-90, etc.

I have used calculated dimension in the bar chart and Sum of invoice value as the expression.

Please find the snapshot of the chart attached.

I want the No-Due bar should have a different color from rest of the bucket bars. for example No dues bars should be of blue color rest to be of Red.

Kindly Help.

10 Replies
PrashantSangle

Hi,

Try like this,

Go to property->Axes->uncheck->multicolored->

then select 1st color from Data Apeareance->color 1-6->You get new Window Color Area

in that Base Color->select Calculated Color

In that write Expression like

if(CalculatedDimensionExpression='No Due',Blue(),Red())

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable

Expand the Expression (Presumably Sum of Invoice that your using) and access the 'Background Colour' property.

Use and IF condition with the calculation that you use for identifying 'No Dues'. In the True part, enter Blue() and else would be Red()

IF(Sum([Your expression for 'No Dues'],Red())

This should work.

Regards,

SK

Colin-Albert

Click on the [+] next to your expression and you can access additional properties such as Background Color, Text Color, Text Format etc.

Add an 'if' expression to the background colour to change the colour.

alkesh_sharma
Creator III
Creator III
Author

Tried the steps, not working out..

My calculated dimension expression is 

=if(today()- (if(vPaymentTerms = 1, [Due Date],  Date([Invoice Date] + vPaymentDays,'DD-MM-YYYY'))) < 0 , Dual('Not Due',1),
if(today()- (if(vPaymentTerms = 1, [Due Date],  Date([Invoice Date] + vPaymentDays,'DD-MM-YYYY'))) >= 0 AND  today()- (if(vPaymentTerms = 1, [Due Date],  Date([Invoice Date] + vPaymentDays,'DD-MM-YYYY')))  <=30, Dual('0-30',2),
if(today()- (if(vPaymentTerms = 1, [Due Date],  Date([Invoice Date] + vPaymentDays,'DD-MM-YYYY'))) >= 31 AND  today()- (if(vPaymentTerms = 1, [Due Date],  Date([Invoice Date] + vPaymentDays,'DD-MM-YYYY'))) <=60, Dual('30-60',3),
if(today()- (if(vPaymentTerms = 1, [Due Date],  Date([Invoice Date] + vPaymentDays,'DD-MM-YYYY'))) >= 61 AND  today()- (if(vPaymentTerms = 1, [Due Date],  Date([Invoice Date] + vPaymentDays,'DD-MM-YYYY'))) <=90, Dual('60-90',4),
if(today()- (if(vPaymentTerms = 1, [Due Date],  Date([Invoice Date] + vPaymentDays,'DD-MM-YYYY'))) >= 91 AND  today()- (if(vPaymentTerms = 1, [Due Date],  Date([Invoice Date] + vPaymentDays,'DD-MM-YYYY'))) <=120, Dual('90-120',5),
if(today()- (if(vPaymentTerms = 1, [Due Date],  Date([Invoice Date] + vPaymentDays,'DD-MM-YYYY'))) >= 121 AND today()- (if(vPaymentTerms = 1, [Due Date],  Date([Invoice Date] + vPaymentDays,'DD-MM-YYYY'))) <=150, Dual('120-150',6),
if(today()- (if(vPaymentTerms = 1, [Due Date],  Date([Invoice Date] + vPaymentDays,'DD-MM-YYYY'))) >= 151 AND today()- (if(vPaymentTerms = 1, [Due Date],  Date([Invoice Date] + vPaymentDays,'DD-MM-YYYY'))) <=180, Dual('150-180',7),
if(today()- (if(vPaymentTerms = 1, [Due Date],  Date([Invoice Date] + vPaymentDays,'DD-MM-YYYY'))) >= 181 , Dual('180+',8)))))))))   
alkesh_sharma
Creator III
Creator III
Author

The expression is not getting properly copied here.

Please copy and paste it in notepad to vie it clearly.

Not applicable

Click on the [+] before each of your expressions and add to the Background Color

if([Age Buckets by Due Date]='No Due',Blue(),Red())

alkesh_sharma
Creator III
Creator III
Author

Expanding the expression and adding color expression is not working guys.

Please help...

Not applicable

hi Alkesh,

I think "if([Age Buckets by Due Date]='Not Due',Blue(),Red())" Should work.

you have written  'No Due' where as it should be 'Not Due'.

alkesh_sharma
Creator III
Creator III
Author

Hey Kuntal, Its 'Not Due' cross checked it twice.

If I do this when the buckets are created in the backed, it works fine, But not working when buckets are created through Calculated dimension in the front end.

Can you do it and gimme the QVW, I am missing something I guess. ???