Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cant get min expression to work properly!

 

Hello I have some data, a set of dates, the number of dates can vary, for example.

25.04.2005

26.08.2009

01.04.2012

I am trying to load where the 1st date is greater than 01.04.2012 and am using the following expression that is not working!

  

if(min(Date_Time_Slice_From>'01.04.2012'),Date_Time_Slice_From)

Any idea on how to get thisworking would be great,

Paul.

16 Replies
Not applicable
Author

 

if(Date(01/04/2012)<=$(minvar),Date_Time_Slice_From) has now turned all my dates into nulls!

 

CELAMBARASAN
Partner - Champion
Partner - Champion

Ok. then check this is your requirement

Sample:\\Which is your datasource

load * inline [

Date,vValues

25.04.2012,14

26.08.2012,45

01.04.2012,67

05.06.2012,67

];

inner join \\used for data restriction

Load vValues where Sampledate >'01.04.2012';

Load vValues, Min(Date) As Sampledate

Resident

Sample

Group by vValues;

Hope it helps

Not applicable
Author

inline load isnt any good, my source data comes from QVD's.

im asking for something basic here, cant be this complex surely?

ONLY load a data record from a QVD if the minimum date is greater or equal to 01.04.2012????

CELAMBARASAN
Partner - Champion
Partner - Champion

Instead of the inline part you can use the QVD source. just for example I load using inline.

CELAMBARASAN
Partner - Champion
Partner - Champion

It might be like this

Sample:\\Which is your datasource

load * from QVD source;

inner join \\used for data restriction

Load vValues where Sampledate >'01.04.2012';

Load vValues, Min(Date) As Sampledate

Resident

Sample

Group by vValues;

Not applicable
Author

im struggling to understand your example, you cant have 2 load statements in a single table. what is vValue?

CELAMBARASAN
Partner - Champion
Partner - Champion

Can you provide a sample qvd file ?