How to filter for YTD Values
I have a dataset that goes back to 2018 and its format is: Month Day, Year 12:00:00. I was looking to filter for rows only with a data between 1/1/22 and 2/21/22 on ETL but when I try to do this through the filter function, it doesn't display anything even though this dataset is updated daily through a live dataflow. Is there a way to do this in ETL or would I have to resort to SQL transform? I know you can filter the dates in analyzer but in this scenario, I can't do that.
This is how the format looks like in etl but before being imported, it looks like Month Day, Year 12:00:00.
Thanks.
Best Answers
-
Try using a formula filter to convert your string you're using for comparison to a date:
`TicketCreatedDate` >= DATE('2022-01-01') AND `TicketCreatedDate` <= DATE('2022-02-21')
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
Here's the format I used in my sample dataset and it worked. Keep in mind, the preview window may not be pulling in all of the rows to accurately determine if your filter is working properly. You might need to run the full ETL, depending on the size of your input dataset.
DATE(`datereported`) >= DATE('1/1/2022') AND DATE(`datereported`) <= DATE('2/1/2022')
It may be the format I use for the hard-coded dates that are making the difference.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.0
Answers
-
Try using a formula filter to convert your string you're using for comparison to a date:
`TicketCreatedDate` >= DATE('2022-01-01') AND `TicketCreatedDate` <= DATE('2022-02-21')
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
@GrantSmith After converting the timestamp to a date through the alter column feature (shown below), I then tried the filter formula you gave me but no rows are still showing. Thoughts?
0 -
I have seen this before. I would take what @GrantSmith is suggesting and wrap the date function around your field as well in the formula. DATE(`TicketCreatedDate`)
I think it is a bug in the ETL and have found that wrapping the date function around both works around the bug.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.0 -
This is what I have so far but still no rows. @MarkSnodgrass
0 -
Here's the format I used in my sample dataset and it worked. Keep in mind, the preview window may not be pulling in all of the rows to accurately determine if your filter is working properly. You might need to run the full ETL, depending on the size of your input dataset.
DATE(`datereported`) >= DATE('1/1/2022') AND DATE(`datereported`) <= DATE('2/1/2022')
It may be the format I use for the hard-coded dates that are making the difference.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.0 -
@MarkSnodgrass @GrantSmith Thank you both for the help! It turns out the data was just not showing in the preview as you said and worked when I saw it after making it as an output.
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive