Filter multiple months by specific days of the month

edited July 2022 in Charting

Hi - I'm looking for a way to take a card with a date range of the previous 13 months and have the ability to filter it for certain days of the month so I've got more of an apples-to-apples comparison. Ex., if today is July 15th then I want to filter the exact days to include so that other months on the card only show data for the first 15 days. Ideally I'd just be able to set the days I wanted to show either via a range or radio button selection.

I'm not seeing an out-of-the-box way to do this. Thanks!

Best Answers

  • MarkSnodgrass
    Answer ✓

    You can actually do this quite easily with beast mode to ensure that you are only showing the same amount in each month.

    (CASE when DAYOFMONTH(`date`) <= DAYOFMONTH(CURRENT_DATE()) THEN 'Include' ELSE 'Exclude' END)

    You can then drag this beast mode into your filters and filter on Include. You can let your date range be whatever time period you want, and this beast mode will filter out dates that are past whatever day in the month it is for previous months.

    Hope this helps.

    **Check out my Domo Tips & Tricks Videos

    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.
  • Will_DOMO
    Answer ✓

    Thanks to you both. These didn't get me where I needed to be HOWEVER they did provide enough info/context to figure it out. As it turns out it was even simpler and only required the DAYOFMONTH ('datecolumn'). Then I setup the beast mode as a range filter and it's perfect.