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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aagregation in QV script

Hello, I am trying to Load below Summary table in QV but it is showing error as Invalid Expression ...

Summary: Load Queue as Q,

SubCategory as S,

Month as M,

Week as W,

If(RAG_Status='R',count(RAG_Status)) as R,

If(RAG_Status='A',count(RAG_Status))as  A,

If(RAG_Status='G',count(RAG_Status))as G

Resident L2_Data group by Queue,SubCategory,Month,Week;

The RAG Status column has 3 values R A and G. Please suggest me the correct syntax.

1 Solution

Accepted Solutions
er_mohit
Master II
Master II

Try this

Load Queue as Q, SubCategory as S,

Month as M, Week as W,

count( If(RAG_Status='R',RAG_Status)) as R,

   count(If(RAG_Status='A',RAG_Status))as  A,

   count(If(RAG_Status='G',RAG_Status))as G

   Resident A group by Queue,SubCategory,Month,Week;

View solution in original post

2 Replies
er_mohit
Master II
Master II

Try this

Load Queue as Q, SubCategory as S,

Month as M, Week as W,

count( If(RAG_Status='R',RAG_Status)) as R,

   count(If(RAG_Status='A',RAG_Status))as  A,

   count(If(RAG_Status='G',RAG_Status))as G

   Resident A group by Queue,SubCategory,Month,Week;

Not applicable
Author

Thanks It Worked..