Discussion board where members can get started with Qlik Sense.
I need to find active and inactive accounts for sample data like,
I need to find count of active and inactive accounts in each day.Suppose for 2nd Jan the count of active and inactive account is 1-1
(D became inactive and E was active)
I'am using the below code in script but getting wrong counts. Any suggestions??
if(ACCOUNT_CODE = Previous(ACCOUNT_CODE),
If(Date >= Previous(Date) and (Date - Previous(Date))=1, 'inactive','active'),'new') as TempFlag
Order By ACCOUNT_CODE,Date;
Drop Table accounts;
If(TempFlag = 'new' and Date > Previous(Date),'inactive',TempFlag) as FinalFlag
Any suggestions on the script?