cancel
Showing results for 
Search instead for 
Did you mean: 

Filter on Calculated Column Working Incorrectly.

Former Member
0 Kudos

My data contains a field [StartDate].

This is coming from a SQL Server table source and is a datetime type.

To show how old each record is, I created a view in Data Insight, and added a column thus :

    Column [Age] =  date_diff(  ###.StartTime, to_date( sysdate(), 'YYYY.MM.DD'), 'DD')

I also only want to see items <=30 days old, so I added a filter in a similar fashion :

     date_diff(  ###.StartTime,to_date( sysdate(),'YYYY.MM.DD'), 'DD') <= 30

Now the interesting thing is the resulting data preview.

I am staring at my calculated column [Age] , and seeing values of 31 staring right back at me !?

Here's the values (SystemTime & StartTime) from 1 row , put into Excel and the Age recalculated:

SystemTimeStartTimeSystem-Start
2015-06-12   11:322015-05-12   06:2031.2

.. so given that, the data preview shows that the Age is being calculated correctly.

Yet the filter is not working correctly.

Any ideas !!??

Accepted Solutions (0)

Answers (1)

Answers (1)

adrian_storen
Active Participant
0 Kudos

I have not used the date_diff but that's a good idea to filter out old records.  I'd be interested to know how you go with it.

Looks like a bug to me...