Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Straight Chart Colour Expression

Hi,

I have a straight chart which show data per criteria.  However I have a field called Last Action which is a calculated field.

On the Straight chart is there a way that I can write an expression so if the Last Action is more than 20 Hours, then on the table it shows a red, while everything under 20 hours is white?

Regards,

Jon Ditchfield

P.S. The calculated field for Last Action is below:

=if(call_status_full = 'Pending' or call_status_full = 'Unaccepted' or call_status_full = 'Off Hold' or call_status_full = 'Unassigned', 

Interval(

          (RangeMin(frac(vJD_TIME), MakeTime(18))

          - RangeMax(frac(lastactdate), MakeTime(8)))

          + (NetWorkDays(lastactdate, vJD_TIME-1) * MakeTime(10)) // Only 10 hours per whole day

))

1 Solution

Accepted Solutions
brindlogcool
Creator III
Creator III

I have added micheal expression in your file and attached it.You can create a variable for the expression and replace the expression with varaible.

View solution in original post

8 Replies
Anonymous
Not applicable
Author

Jon,

You certainly can.  Use attribute expressions for text color, and use your expression for last action, a sort of this:

if(<your expression> >20, red())

Regards,

Michael

brindlogcool
Creator III
Creator III

I understand you want highlight the row in the striaght table when the last action is more than 20 hours.

I would prefer to define the last action and its duration in the edit script as addtional columns.

And you can define the background color of dimension and expression. if you could attach the sample file it would be easier to analyze.

Not applicable
Author

Hi,

Please find attached a copy of the Qlikview File. 

Anonymous
Not applicable
Author

Use this as expression for background color:

=

if(
if(call_status_full = 'Pending' or call_status_full = 'Unaccepted' or call_status_full = 'Off Hold' or call_status_full = 'Unassigned', 
(          (
RangeMin(frac(vJD_TIME), MakeTime(18))
          -
RangeMax(frac(lastactdate), MakeTime(8)))
          + (
NetWorkDays(lastactdate, vJD_TIME-1) * MakeTime(10)) // Only 10 hours per whole day
))*24

>20,
rgb(255,200,200))

Not applicable
Author

Hi Michael,

I have entered the above expression in the table, under style, background, color, and then pasted into calculated colour, however it all still shows the writing as black.

brindlogcool
Creator III
Creator III

I have added micheal expression in your file and attached it.You can create a variable for the expression and replace the expression with varaible.

Anonymous
Not applicable
Author

It is in attribute expressions, not style background - see example form brindlogcool.

Regards,

Michael

Not applicable
Author

Thanks Both, this worked as I wanted it too.