Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
krishna789
Creator II
Creator II

how to find days of due date like <1days,<2days by using due date field?

hi

i have due date field  .if i give drop down list  < 1 days,<2day,<5day  . I should get   tables related to due date .my question is how find

<1 day ,<2 day  from due date .pls share any set analysis .

1 Solution

Accepted Solutions
sunny_talwar

Why do you need set analysis for this? You need a filter, right? Create a new field in the script like this may be

If(Today() - DueDate < 1, '< 1 days',

     If(Today() - DueDate < 2, '< 2 days',

          If(Today() - DueDate < 5, '< 5 days'))) as DueDays

View solution in original post

8 Replies
sunny_talwar

Get the days of due date by comparing due date to what? Today?

Clever_Anjos
Employee
Employee

You can use a As-Of table with proprer flags

The As-Of Table

krishna789
Creator II
Creator II
Author

actually i have due date field  .i should find less than one day how many  due are there similarly less than 2 days,less than 5 day .

we will write like load editor

load

max(duedate)  as less than1

max(duedate)-2   as less than2.

i am not sure above syntax   .  sorry  for poor communication 

krishna789
Creator II
Creator II
Author

compare with today

sunny_talwar

Why do you need set analysis for this? You need a filter, right? Create a new field in the script like this may be

If(Today() - DueDate < 1, '< 1 days',

     If(Today() - DueDate < 2, '< 2 days',

          If(Today() - DueDate < 5, '< 5 days'))) as DueDays

pradosh_thakur
Master II
Master II

hi

Try this. and please check the date format in your app before use to get the correct data

1: create inline table with one column

load *inline

[

  diff

     1

     2

     5

];

    

2 create a list box and use expression instead of field

=if(diff=1,'<1 day',if(diff=2,'<2days',if(diff=5,'<5 days')))  ->> filter

3: another list box with expression

=If(DueDate-Today()<= GetFieldSelections(diff), DueDate,

     If(DueDate-Today()<= GetFieldSelections(diff),DueDate,

          If(DueDate-Today()<=GetFieldSelections(diff),DueDate,null())))

let me know if you need a qvw

regards

Pradosh


Learning never stops.
pradosh_thakur
Master II
Master II

if today() used in the script is it needed to reloaded daily for updation or it will be done automatically?

Learning never stops.
sunny_talwar

Daily reload will be needed