Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
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
MayilVahanan

HI

Try like this

if(Date_Time_Slice_From>'01.04.2012',Date_Time_Slice_From)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

No that didnt work at all! Ive still got data pre 01.04.2012!!!

Not applicable
Author

In ur expression

create one variable for

min(Date_Time_Slice_From)

then use this variable in the expression

it useful

Not applicable
Author

How? i've been unsuccessful in using MIn in script

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

Are you using this in script whioch means you can limit this with Where clause

Load *

From Source

Where Date_Time_Slice_From>'01.04.2012';

If 01.04.2012 is not a default date format then you have to format using Date#(Date string, Format) function.

Hope this helps

MayilVahanan

HI

PFA

Regards,

R.MayilVahanan

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

no no no. Look at the original example I quoted, I want it where the earliest value is >01.04.2012

your example will load all data pre 2012.

Not applicable
Author

I am only interested if the minimum value is 01.04.2012, I dont want to load any records where the earliest value is pre 2012.

Not applicable
Author

im using this in table expression

create one variable for

min(Date_Time_Slice_From)

use this variable in expression like

if(date(1/1/2012)<=$(minvar),sum(price))

it work for me i check this