Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello all,
newbie need help..
how to load data into qlikview with an condition?
case,
i want to load agingday to qlikview
the formula of agingday is,
agingday = today() - min(duedate) where paidstatus = 0
Syntax in SQL,
select datediff(day, GETDATE() - min(duedate)) as AgingDay from CorAccountDetail
where Paidstatus = 0
in editscript,
i type like this,
load
num( interval ( today() - date(duedate))) as Agingday
from[......]
syntax above work, but without condition,
how can i set condition in there??
or just set condition in expression?? what is the syntax?
plis help
thank you all,
regards....
Hi,
You can enter the condition in your SQL part. The syntax will be as follows,
Load *;
SQL select *
from Tab1
where Condition;
hello haneesh, i have try it, but it won't work
Your SQL expression will return at most one value. Is this what you really want?
Jonathan
pls post script from qlikview application. or post application itself
Hello Jonathan,
Syntax in SQL is like this,
select AccountID, datediff(day, GETDATE() - min(duedate)) as AgingDay from CorAccountDetail
where Paidstatus = 0
Group by AccountID
hello sunin,
that's the problem, i can't type this condition in qlikview script, can you help me? what is the syntax?
Pls Implement This script in your application
Raw3:
Load *,
(Today()-PostingDate) as Days,
// IF(('$(MaxDate)'-PostingDate)>0 AND ('$(MaxDate)'-PostingDate)<=15, '0-15',
IF((Today()-PostingDate)>0 AND (Today()-PostingDate)<=15, '0-15',
IF((Today()-PostingDate)>15 AND (Today()-PostingDate)<=30, '16-30',
IF((Today()-PostingDate)>30 AND (Today()-PostingDate)<=45, '31-45',
IF((Today()-PostingDate)>45 AND (Today()-PostingDate)<=60, '46-60',
IF((Today()-PostingDate)>60 AND (Today()-PostingDate)<=90, '61-90',
IF((Today()-PostingDate)>90 AND (Today()-PostingDate)<=180, '91-180',
IF((Today()-PostingDate)>180 AND (Today()-PostingDate)<=365, '6Month-1Year',
IF((Today()-PostingDate)>365 AND (Today()-PostingDate)<=730, '1Year-2Year',
IF((Today()-PostingDate)>730 AND (Today()-PostingDate)<=1095, '2Year-3Year',
IF((Today()-PostingDate)>1095 AND (Today()-PostingDate)<=1825, '3Year-5Year',
IF((Today()-PostingDate)>1825, 'Above-5Year'
))))))))))) as Out_Ageing
resident Raw2;
drop table Raw2;