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: 
SaraAbdulah
Contributor II
Contributor II

conditional expression

hello,

I need to calculate how many letter(DisplayNumber) on system not read more than 5 days using the days difference([D_DIFF])

status code of not read is (isread=0) grouping by userID ([USER_ID]) and departmentID ([DEPT_ID-DEPT_NO])

could you please correct my statment below:

Load
[USER_ID],
[DEPT_ID-DEPT_NO],
[D_DIFF],
[ISREAD],
[DISPLAYNUMBER],
if([D_DIFF]>5,count([DISPLAYNUMBER]))
Resident MOAMALAT_AMEEN_KPI_READ_NOTREAD_NOTDONE_FACT
where [ISREAD] =1
Group by [USER_ID],[DEPT_ID-DEPT_NO];

Labels (3)
1 Reply
Chanty4u
MVP
MVP

Try this 

LOAD

    [USER_ID],

    [DEPT_ID-DEPT_NO],

    [D_DIFF],

    [ISREAD],

    [DISPLAYNUMBER]

RESIDENT MOAMALAT_AMEEN_KPI_READ_NOTREAD_NOTDONE_FACT

WHERE [ISREAD] = 0 AND [D_DIFF] > 5

GROUP BY [USER_ID], [DEPT_ID-DEPT_NO];