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 toany 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 toany 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 toany 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
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 311 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3.8K Transform
- 659 Datasets
- 116 SQL DataFlows
- 2.2K Magic ETL
- 815 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 82 App Studio
- 45 Variables
- 776 Automate
- 190 Apps
- 481 APIs & Domo Developer
- 82 Workflows
- 23 Code Engine
- 40 AI and Machine Learning
- 20 AI Chat
- 1 AI Playground
- 1 AI Projects and Models
- 18 Jupyter Workspaces
- 410 Distribute
- 120 Domo Everywhere
- 280 Scheduled Reports
- 10 Software Integrations
- 144 Manage
- 140 Governance & Security
- 8 Domo Community Gallery
- 48 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 114 Community Announcements
- 4.8K Archive