How to filter results to show only the last 30 days?

3 followers
0
Avatar

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.

MorganM

5 comments

  • Avatar
    Frances Angulo

    Hi there!

    There are many advanced filters you can use to do this- but have you considered partitioning the data at ingest so that you can filter results based on those partitions? You can create filter sheets with different time frames and use those as sources for other workbooks.

    0
  • Avatar
    MorganM

    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.

    0
  • Avatar
    MorganM

    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.

    0
  • Avatar
    Frances Angulo

    The filter looked solid, especially if your results appeared correct- and yes- the date partitioning on the sources happens at the connection point, so your admin would likely need to help here :)

    1
Please sign in to leave a comment.