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

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
paulwalker
Creator III
Creator III

Date colors based on Condition??

Hi All,

I Have a Date field,

I want to calculate like this..

[Date]<=10,'0-10',

[Date]<=20,'11-20',

[Date]<=35,'21-35',

[Date]<=45,'36-45','Lapsed'

how to calculate..

--Paul

4 Replies
swuehl
MVP
MVP

Try something like this in your script or frontend


if( [Date]<=10,'0-10',

if([Date]<=20,'11-20',

if([Date]<=35,'11-35',

if([Date]<=45,'36-45','Lapsed'))))

rustyfishbones
Master II
Master II

Hi Paul,

Did you try looking at using the Class function

paulwalker
Creator III
Creator III
Author

Hi Swuehl,

Suppose i am using Straight table..

here calculate 4 columns 0-10,11-35, 36-45 and Lapsed

rustyfishbones
Master II
Master II

Create a Calculated Dimension and add Swuehl IF statement

to add colors just add it in the background color

like below

2014-01-03_1548.png