Quantcast
Channel: SCN: Message List - SAP Information Steward
Viewing all articles
Browse latest Browse all 1748

Filter on Calculated Column Working Incorrectly.

$
0
0

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 !!??


Viewing all articles
Browse latest Browse all 1748

Trending Articles