How to filter results to show only the last 30 days?
Columns:
- end_time (date time)
- entity (string)
- sub_entity (string)
- successful (boolean)
- instance (string)
I want to filter so only rows where end_time is within the last 30 days. So ... like ... NOW minus 30 days. I want this to show data for the last 30 days regardless of if it's ran today or a week from now; it's always 'the last 30 days' of information.
I tried a few things and they didn't work. Did a lot of searching; not much out there. Please help!
Here's what I've tried:
DAY(NOW(#end_time)-30d) I likely have no idea what I'm doing here and that's why it failed :)
#end_time >= 30 didn't work .. again... likely because I don't know what the heck I'm doing here.
-
I think I got this to work... #end_time >= NOW()-30d
I'm not sure how I'm failing at partitioning data but I can't seem to get it to work. I save my workbook, I configure partitioning under "Save Results and Time Based Partitioning", run the workbook, then go back in and the "Partition Filter" button is grayed out.
-
ah! Partitioning RESULTS is not the same as partitioning the source data. Go back to your source artifact, click the gear (to configure) and look near the bottom of the schema definition screen for "Use Time Based Partitions". Check this out: https://documentation.datameer.com/documentation/current/Partitioning+Data+in+Datameer#PartitioningDatainDatameer-importJobsPartitioningDataDuringImport/FileUploadsandDataLinks
-
by 'source artifact' you are referring to my datasource.dst connection where I pulled data into my workbook originally right?
That being the case I do not have permissions to edit that. I can get with my Datameer admin to do this but I can't do it right this second =(
What do you think about my advanced filter though? I did a quick validation on a new sheet to GroupBy end_time and only 30 entries came back... the previous 30 days.
Please sign in to leave a comment.
Comments
5 comments