Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
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
Contributor III

Re: Straight Chart Colour Expression

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
mov
Esteemed Contributor III

Re: Straight Chart Colour Expression

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
Contributor III

Re: Straight Chart Colour Expression

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

Re: Straight Chart Colour Expression

Hi,

Please find attached a copy of the Qlikview File. 

mov
Esteemed Contributor III

Re: Straight Chart Colour Expression

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

Re: Straight Chart Colour Expression

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
Contributor III

Re: Straight Chart Colour Expression

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

mov
Esteemed Contributor III

Re: Straight Chart Colour Expression

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

Regards,

Michael

Not applicable

Re: Straight Chart Colour Expression

Thanks Both, this worked as I wanted it too.