Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Chanty4u
MVP
MVP

RE:Exact colur

Hi all,

I have some issue on colur coding.  below is my code for  colurs

  count(if(Prod_Severity = '1-Critical' or Prod_Severity = '2-Major',Prod_Defect_ID))

  ) * 100 < 95, rgb(255,0,0),

but am getting   for  100%   its shwng  amber  without any selections.

and if i do any selection that value is 100%  and colur shwng as green?

how come  is there any issue in the exp?

Thanks in advance.

1 Solution

Accepted Solutions
sunny_talwar

Missed the if statement

If(Count({<Prod_Severity = {'1-Critical', '2-Major'}>} Prod_Defect_ID) * 100 < 95, RGB(255,0,0),

If(Count({<Prod_Severity = {'1-Critical', '2-Major'}>} Prod_Defect_ID) * 100 < 100, RGB(255,200,10), Green()))

View solution in original post

14 Replies
sunny_talwar

1st of all, I would suggest you change the if statements to set analysis. I still don't know what might be causing it, but changing to set analysis will clear out some clutter here:

Count({<Prod_Severity = {'1-Critical', '2-Major'} Prod_Defect_ID) * 100 < 95, RGB(255,0,0),

Count({<Prod_Severity = {'1-Critical', '2-Major'} Prod_Defect_ID) * 100 < 100, RGB(255,200,10), Green()))

Chanty4u
MVP
MVP
Author

shwng expression error sunny.

sunny_talwar

Sorry, I missed the missing set analysis syntax:

Count({<Prod_Severity = {'1-Critical', '2-Major'}>} Prod_Defect_ID) * 100 < 95, RGB(255,0,0),

Count({<Prod_Severity = {'1-Critical', '2-Major'}>} Prod_Defect_ID) * 100 < 100, RGB(255,200,10), Green()))

Chanty4u
MVP
MVP
Author

Hmmm..Still it is shwng error in expression?

sunny_talwar

Missed the if statement

If(Count({<Prod_Severity = {'1-Critical', '2-Major'}>} Prod_Defect_ID) * 100 < 95, RGB(255,0,0),

If(Count({<Prod_Severity = {'1-Critical', '2-Major'}>} Prod_Defect_ID) * 100 < 100, RGB(255,200,10), Green()))

Chanty4u
MVP
MVP
Author

still same issue.........sunny

sunny_talwar

Really? that is embarrassing? Your original expression worked as you would expect without errors?

Anonymous
Not applicable

Count({<Prod_Severity = {'1-Critical', '2-Major'}>} Prod_Defect_ID) * 100 < 95, RGB(255,0,0),

Count({<Prod_Severity = {'1-Critical', '2-Major'}>} Prod_Defect_ID) * 100 < 100, RGB(255,200,10), Green()))

Chanty4u
MVP
MVP
Author

original exp wrkng fyn but the colurs not givng exctly...