Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have one urgent requirement. Requirement is that if Rate of Transport from 6-7-13 to 13-7-13 is 895 and from 1-7-13 to 5-7-13 is 855.Then I need Previous Rate which is 855. How i find ??
My code is below:
Freight:
LOAD
FROMDELIVERYPOINTCODE&TODELIVERYPOINTCODE&VEHICLETYPE&Upper(DLVMODEID) as KEY,
RATE,
DLVMODEID,
FROMDELIVERYPOINTCODE,
TODELIVERYPOINTCODE,
VEHICLETYPE,
if(ALE_FREIGHTTYPE=0,'Primary','Secondary') as ALE_FREIGHTTYPE,
date(EFFECTIVEDATETIME) AS StartDate
FROM
D:\QLIKVIEW_RAWDATA\ALE_FREIGHTTABLE.QVD
(qvd)Where DATAAREAID=100 and YEAR(EFFECTIVEDATETIME)<>1900;
Right Join("Freight")
Load
*,
Date(if(Previous(KEY) = KEY,date(previous(StartDate)-1),date(Today()))) as EndDate,
if(KEY=Previous(KEY),Previous(RATE)) as [Previous RATE]
Resident Freight //Where num(StartDate)<=Date(if(Previous(KEY) = KEY,date(previous(StartDate)-1),date(Today())))
Order By KEY,StartDate Desc;
Please help me out !!
Thanks in advance ..
Regards
Deepak
Hi,
Deepak Kindly share the sample file.
Regards,
Kaushik Solanki
Hi Kaushik,
Please find the file in the updated post.
Regards
Deepak
Dear Deepak,
Its hard to find what exactly you are looking from QVW file.
Kindly guide us what selections to be done and what output you are expecting.
Regards,
Kaushik Solanki
Hi Kaushik,
You can look in the Updated Post.I explain in the Text Object on the Main Tab.
Regards
Deepak
Hi,
Have a look at the attachment, see the last Tab.
Regards,
Kaushik Solanki
Thanks a lot Kaushik it works !!