Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to change values to positive and how to change the colour of the value?


Hi,

I have straight table with

dimensions  as CaseCode,DueDate

expression as Days in List = today()-aggr(Date(max(DueDate)),CCode)

Based on above expression the Days in List is showing negative and positive values. How can I change all values to positive. I need to change the colour of values if the Due Date is future I need green. If Due Date is earlier date(I,e past date) I need red colour. Is it possible? please can anyone suggest me please.

Thanks.

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Use FABS() function

Update : Change color accordingly...

View solution in original post

11 Replies
Not applicable
Author

Please see attached.

MK_QSL
MVP
MVP

Use FABS() function

Update : Change color accordingly...

Greg_Williams
Former Employee
Former Employee

Have you tried > Chart properties > Expressions > expand expression to show Background image > insert your logic in an if statement (if, logic,rgb(255,0,0),rgb(0,255,0))

rgb(255,0,0) = red, 0,255,0 = green

Hope this helps.

Greg

Not applicable
Author

Thanks Perfect. How to change the colour?

MK_QSL
MVP
MVP

Check enclosed file in previous reply.

its_anandrjs
Champion III
Champion III

On the expression put -

like

= - * today()-aggr(Date(max(DueDate)),CCode)

or use

Fabs(today()-aggr(Date(max(DueDate)),CCode))

Not applicable
Author

Thanks that's good. It's working.

mphekin12
Specialist
Specialist


Will this work for you?

its_anandrjs
Champion III
Champion III

And for background color use

by click on + sign in the expression

=IF(today()-aggr(Date(max(DueDate)),CaseCode) < 0,LightRed(),LightGreen())