cancel
Showing results for 
Search instead for 
Did you mean: 

Showing last one month data in HANA

vaibhav_rathore
Participant
0 Kudos

Hi,

I want to show last one month data from current date.

I have a date field "LOGGEDON"

I want to filter it in projection , so that the filtered data is only passed to upper level.

What are the ways to do it?

Kindly suggest.

Regards

Vaibhav

View Entire Topic
chandan_praharaj
Contributor
0 Kudos

Vaibhav,

I think I got your problem,

Kindly create a Calculated column for longdate("LOGGEDON") as CC1

then you already has Calculated created column of yours with (adddays(now(),-30)) as CC2


then compare the Expression , you will not get the error.


Regards,

Chandan

vaibhav_rathore
Participant
0 Kudos

Hi Chandan,

This time i am not getting any error and created two calculated columns:

1) L_Date:

                  "LOGGEDON"

2) Add_Date:

                    adddays(now(),-30)

Created an Expression where:

"L_Date"="Add_Date"

this time not getting any error, but while previewing the data it showing empty result, No Rows Retrieved.

Even i tried for past 60 days but no result. Although the data is there.

What could be the reason?

plz suggest

Regards

Vaibhav

chandan_praharaj
Contributor
0 Kudos

Two things here.

try to cast it as I told. longdate("LOGGEDON")

here you are trying to see data for a particular (29 Apr 2016 -30) date .  can you directly see the table has any record for that particular date??

vaibhav_rathore
Participant
0 Kudos

Chandan,

I have created the longdate for LOGGEDON.

And i am in need of past 30 days data from todays date, and it is there i have checked it.

Regards

former_member656087
Discoverer
0 Kudos

Hi,

use below expression

No need to create any calculated columns.

just use this expression

"LOGGEDON" < = date(now()) and "LOGGEDON" >= date(adddays(now(),-30))

Thanks,

Ramesh