Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
durgabhavani
Creator III
Creator III

Help me in writing dimension?


Hi All,

I have one dimension as below:

Duedays

< 10 days

= 10 days

< 10 days

Now i want to write caliculated dimension for barchart

if Duedays < 10 days then bar should be green

if Duedays = 10 days then bar should be orange

if Duedays < 10 days then bar should be red

Please advice.

Thanks,

durga

1 Solution

Accepted Solutions
ankitaag
Partner - Creator III
Partner - Creator III

Hey,

Write the background color expression in expression value.

see the attached inliune

color.PNG

View solution in original post

9 Replies
durgabhavani
Creator III
Creator III
Author

last value is > 10 days I wrote < 10 days value two times.

Please consider and advice.

ankitaag
Partner - Creator III
Partner - Creator III

Hi,

Click the + option of the Duedays dimension.. Double click the background color.. Write the expression as

=if(Duedays  < 10 days,RGB(0,255,0),if(Duedays=10 days,RGB(255,128,0),rgb(255,0,0)))

PrashantSangle

Hi,

USe DueDays as your dimension

the cilck on + symbol

BackgroundColour

write condition

if(Duedays < 10,green(),if(Duedays >10,Red(),RGB(of ORANGE)))

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 🙂
durgabhavani
Creator III
Creator III
Author

Hi Ankitha/Max

I am unable to find the changes in my barchart. What might be the problem?

Thanks,

Durga

awhitfield
Partner - Champion
Partner - Champion

Hi Durga,

simple example attached

Regards

Andy

durgabhavani
Creator III
Creator III
Author

andrew,

Please share screenshot, i am unable to open qvw in office due to security reasons.

I wrote the above conditions in my barchart backgroud color expression but color is not changing for bars.

waiting for reply.

Thanks,

Durga

ankitaag
Partner - Creator III
Partner - Creator III

Hey,

Write the background color expression in expression value.

see the attached inliune

color.PNG

awhitfield
Partner - Champion
Partner - Champion

Ok,

chart has DueDays as dimension and Count(DueDays) as the expression, the background colour is set against the expression with the following :

if(DueDays < 10,green(), if(DueDays =10,RGB(225,128,0) ,Red()))

The data loaded was:

DueDate:
Load * Inline
[
DueDays
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
]
;

And the chart looks like this:

617548.png

Regards

Andy

durgabhavani
Creator III
Creator III
Author

Thanks anikta and andrew, it is working.

I am writing this condition for dimension. it is not working for dimension. but working for expression.

Once again thanks.

Please see my another question in recent thread.

Help me in writing expression to indicate bulb and advice.

Durga.