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

Error

Hi Expertise

Iam using the below expression to make the colour changes for the values .

Can please somone correct this

if(Days>0 and <5) and (count({<Dept={'A'}>}ID)-count({<Dept={'A'},Status={'Pass'}>}ID))/Dept({<Dept={'A'}>}ID)<5,Green(),

if(Days>0 and <5) and (count({<Dept={'A'}>}ID)-count({<Dept={'A'},Status={'Pass'}>}ID))/Dept({<Dept={'A'}>}ID)=5,Orange(),

if(Days>0 and <5) and (count({<Dept={'A'}>}ID)-count({<Dept={'A'},Status={'Pass'}>}ID))/Dept({<Dept={'A'}>}ID)=5,Red(),

if(Days>8 and <14) and (count({<Dept={'A'}>}ID)-count({<Dept={'A'},Status={'Pass'}>}ID))/Dept({<Dept={'A'}>}ID)<20,Green(),

if(Days>8 and <14) and (count({<Dept={'A'}>}ID)-count({<Dept={'A'},Status={'Pass'}>}ID))/Dept({<Dept={'A'}>}ID)=20,Orange(),

if(Days>8 and <14) and (count({<Dept={'A'}>}ID)-count({<Dept={'A'},Status={'Pass'}>}ID))/Dept({<Dept={'A'}>}ID)>20,Red(),

Thanks in Advance

3 Replies
Anil_Babu_Samineni

May be try this for all expressions

if((Days>0 and Days<5) and ((count({<Dept={'A'}>}ID)-count({<Dept={'A'},Status={'Pass'}>}ID))/Count({<Env={'A'}>}ID))<5,Green(),

....... // In the last part of Count you used Dept not sure the function is available in Qlikview

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
smilingjohn
Specialist
Specialist
Author

Hi Anil.

Sorry it was a mistake ..This is the right one

if(Days>0 and <5) and (count({<Dept={'A'}>}ID)-count({<Dept={'A'},Status={'Pass'}>}ID))/Dept({<Dept={'A'}>}ID)<5,Green(),

if(Days>0 and <5) and (count({<Dept={'A'}>}ID)-count({<Dept={'A'},Status={'Pass'}>}ID))/Dept({<Dept={'A'}>}ID)=5,Orange(),

if(Days>0 and <5) and (count({<Dept={'A'}>}ID)-count({<Dept={'A'},Status={'Pass'}>}ID))/Dept({<Dept={'A'}>}ID)=5,Red(),

if(Days>8 and <14) and (count({<Dept={'A'}>}ID)-count({<Dept={'A'},Status={'Pass'}>}ID))/Dept({<Dept={'A'}>}ID)<20,Green(),

if(Days>8 and <14) and (count({<Dept={'A'}>}ID)-count({<Dept={'A'},Status={'Pass'}>}ID))/Dept({<Dept={'A'}>}ID)=20,Orange(),

if(Days>8 and <14) and (count({<Dept={'A'}>}ID)-count({<Dept={'A'},Status={'Pass'}>}ID))/Dept({<Dept={'A'}>}ID)>20,Red(),

How should i correct this one to get the desire result

Anil_Babu_Samineni

When you say, This is right one you are not applying anything where i recommend. Looks like you got the solution and assumed answer as flag..

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful