Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis in Load script itself

Hi guys i want to know if we can do set analysis on the load script itself.

15 Replies
Not applicable
Author

Hi Nate,,

could you please reply me once..

hallquist_nate
Partner - Creator III
Partner - Creator III

Is there a timestamp that identifies that last row?  if there is, you could use that.  Since the Peek function isn't working, maybe you could use a GroupBy function to group the Tagnames and then get the max record.  I'd have to see some sample data to get more specific.  Is there a specific reason why the Peek function isn't working?

Not applicable
Author

Hi nate, thanks for the reply. I have used  Max function, but, I am unable to the date value into a variable, but I am able to get the Date value in text object

please look at the code below

vTagForPO=(FillA, FillB,FillC);

NoConcatenate

  GetPOTime:

  SELECT TagName as TagsForPOTime,

  DateTime as POTime

  FROM

  History

WHERE

  TagName IN$(vTagForPO)

  AND DateTime >= '$(vProdStartTime)'

  AND DateTime <= '$(vThisExecTime)'

  NoConcatenate

  FactGetPOChangeTime:

  LOAD

  TagsForPOTime,

  if(TagsForPOTime='Fill A',POTime,0) as Fill A Time,

  if(TagsForPOTime='Fill B',POTime,0) as Fill B Time,

  if(TagsForPOTime='Fill C',POTime,0) as Fill C Time

  Resident GetPOChangeTime;

  LET vFillATime=Max([Fill A Time]);

  LET vFillBTime=Max([Fill B Time]);

  LET vFillCPOTime=Timestamp(Max(Fill C TIme),'YYYY-MM-DD hh:mm:ss');

when i use the this Timestamp(Max(Fill C TIme),'YYYY-MM-DD hh:mm:ss'); expression in a text object, I am getting the exact value

//LET vFillCPOTime1=Time(Max(Time#([BoschCPOTIme],' YYYY-MM-DD hh:mm:ss')),'YYYY-MM-DD hh:mm:ss');

Not applicable
Author

damn where did nate go

hallquist_nate
Partner - Creator III
Partner - Creator III

Sorry, been busy with client work and a Job change. 

Is this still an open issue?

Nate

Not applicable
Author

No, I was just looking through old threads trying to solve my issue. I think this thread is resolved though.