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

Display the oldest date in a text object based on values

Hi,

I have a sample set of data values as shown below. My requirement is to dynamically display only the date of the oldest overdue work# in a text object. In this case it would be 2/14 or Feb 2014 .  

Thanks for the help!

1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi Ashwin,

not sure I totally understand but try this.

1. In your load script, create new field with actual date, something like that

     ...

     MakeDate( 2000+ num(right([MM/YY],2)), left([MM/YY], Index([MM/YY],'/',1)-1 )) as workdate,

     ....

2. Then create a textbox with this expression

=min({$<Overdue_flag={1}>} workdate)

This will output 02/01/2014

is this what you have in mind?

View solution in original post

3 Replies
Anonymous
Not applicable

Hi Ashwin,

not sure I totally understand but try this.

1. In your load script, create new field with actual date, something like that

     ...

     MakeDate( 2000+ num(right([MM/YY],2)), left([MM/YY], Index([MM/YY],'/',1)-1 )) as workdate,

     ....

2. Then create a textbox with this expression

=min({$<Overdue_flag={1}>} workdate)

This will output 02/01/2014

is this what you have in mind?

regowins
Creator II
Creator II
Author

Thanks!!! That will work.


I guess I was wondering if there was a way to accomplish this without having to make changes to the script with only the given data. That may not be possible.

Anonymous
Not applicable

it is possible but your expression will be more complicated than it needs to be and you should strive to do all transformations you can in your load script.

Remember that you normally want to spend 60% of your time on a data model and 40% on the visualizations - data model is the key!