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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
khanashique
Creator II
Creator II

How to use 'if' & 'between' condition for Background Color Expression

Hi Experts,

I want to set background color expression and i have tried to use the following statement, please advise what is wrong with these statements:

if([Counts] <= '50', rgb(30,144,255), <---- [Counts] here is measure i have used as master items

if([Counts] >= '51' , rgb(81,81,81),

rgb(0,192,0)))


Other statement which i have tried:


if(Count(UserID) <= '50', rgb(30,144,255), <---- here count is aggregate function which counts userid

if(Count(UserID) >= '51' , rgb(81,81,81),

rgb(0,192,0)))



I do not know how to use 'between' condition, have tried to search on internet but hard luck...



Thanks,

MAK.

1 Reply
undergrinder
Specialist II
Specialist II

Hi Ashik,

I think the [Counts] contains number not string, so try without quotes. [Counts] <= '50' -> [Counts] <= 50

Otherwise the syntax seems right.


There is no between condition in Sense, but you can define multiple condition in if statement.

eg.: if( a>10 and a<20, 'between 10 - 20 exclusive')


G.