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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
dmohanty
Partner - Specialist
Partner - Specialist

Expression value in Traffic Light Gauze

Hi All,

I have an Expression like this below:

if(sum(Status)<= count(DISTINCT [KPI])*1, RED(),

  if(sum(Status)< count(DISTINCT [KPI])*2, YELLOW(), GREEN()

  ))

I want to use a Traffic Light Gauze chart. If the Condition 1 will satisfy, RED color will come. If 2nd color satisfies, YELLOW color will come. Else GREEN.

My challenge is how/what to use in Min and Max values and Segments Lower Bound Values, as the Conditions in Expression is DYNAMIC.

Please help on this.

Regards!

1 Solution

Accepted Solutions
jerem1234
Specialist II
Specialist II

Here is an attached example. I'm guessing you situation is a little more complicated. Are you using in a straight table? What dimension do you want to aggregate by?

Hope this helps!

View solution in original post

4 Replies
jerem1234
Specialist II
Specialist II

You could put min as 0, and max as 3. Then have lower bounds as 0, 1, 2. Where 0 would be for green color, 1 for yellow, and 2 for red. Then for your expression, just change your colors respectively:

if(sum(Status)<= count(DISTINCT [KPI])*1, 2,

  if(sum(Status)< count(DISTINCT [KPI])*2, 1, 0

  ))

Hope this helps!

dmohanty
Partner - Specialist
Partner - Specialist
Author

Hi Jerem,

Thanks for the help.

But somehow I am unable to achieve this. Could you please show in a QVW file, taking this as data?

LOAD * INLINE [

    EmpID, KPIs, Status, Month

    100, A, 3, 1

    100, B, 1, 1

    100, C, 2, 1

    100, A, 1, 2

    100, B, 1, 2

    100, C, 2, 2

    100, A, 2, 3

    100, B, 3, 3

    100, C, 3, 3

];

Regards!!

jerem1234
Specialist II
Specialist II

Here is an attached example. I'm guessing you situation is a little more complicated. Are you using in a straight table? What dimension do you want to aggregate by?

Hope this helps!

dmohanty
Partner - Specialist
Partner - Specialist
Author

Thanks much Jerem for this quick help!!

No, I am using in a Gauze Chart itself. I was trying the way you have implemented. Thanks

But in a straight table I am achieve to do this.I am taking 'Month' as the Dimension and in the Expression, I am using the formula in the Background Color. But I have to show in a Gauze Chart finally.

Regards!