Interactive Date Filter card

Hey all,

 

I'm building out a dashboard where I want the user to be able to easily select a date range for the data being displayed. I've built a date filter card for the dashboard and it appears as the "date filter 1" image. However, I'd rather have the view after you click on the "Presets" button on the top right hand corner of the card (shown in "date filter 2"). This view just makes more sense for how we want this dashboard to function. Is there any way I can default the card to show the presets view (or something similar) instead of the full calendar view? 

 

Thanks!

Comments

  • BlueRooster
    BlueRooster Domo Employee

    I haven't been able to find a way to accomplish this in my own testing, but would love this option.

     

    If no else knows how to do this, it would be a great topic for the Ideas Exchange.

     

    Sincerely,
    Valiant

  • I was thinking you could do a beast mode to give yourself the options, but one row of data may be part of several of the options, so I'm not sure that's a great option.

     

    One alternative, instead of the calendar view, would be the min/max slider view (Range Selector card type).  It's an even simpler interface than either of your attached views.

    slider.JPG

    Aaron
    MajorDomo @ Merit Medical

    **Say "Thanks" by clicking the heart in the post that helped you.
    **Please mark the post that solves your problem by clicking on "Accept as Solution"
  • @AS  Thanks for the reply! I've tried the Range Selector card type and it couldn't work, due to the size of the data set I'm working with. So I ran with the beast mode idea. Wrote this just to try it out:

     

    case

    when DATEDIFF(CURRENT_DATE(),`Date`) <= 7 then 'Previous 7 days'
    else 'try this'
    end

     

    Shared that with the dataset and it worked, producing what the image shows and filtering the cards I need it too. I still would prefer to have the 'Presets' view I mentioned in my original post, but I think this can work for what I want to do.

     

    Thanks!

  • Does that work when you try "Previous 30", "Previous 90", etc?

     

    Because I would think with the way case statements work, once a match has found, the value is assigned only once.  So a date three days ago is simultaneously "Previous 7", "Previous 30", and "Previous 90", but would only appear in the "Previous 7" since that condition is met first.

    Which could work, I suppose, if you click on all the options in the filter card, not just one.

    Aaron
    MajorDomo @ Merit Medical

    **Say "Thanks" by clicking the heart in the post that helped you.
    **Please mark the post that solves your problem by clicking on "Accept as Solution"
  • @AS Woops, yeah, that beast mode doesn't work when built further out.

  • Is the data accurate if you click on multiple selections (even if it's not the ideal workflow)?

    Aaron
    MajorDomo @ Merit Medical

    **Say "Thanks" by clicking the heart in the post that helped you.
    **Please mark the post that solves your problem by clicking on "Accept as Solution"
  • Yes, if I select Previous 7 Days and Previous 14 Days, all of the previous 14 days will show.

  • That's an alternative then, I guess. With the right labels, that might make decent sense.

    0-7 Days

    8-30 Days

    31-90 Days

    etc

    Aaron
    MajorDomo @ Merit Medical

    **Say "Thanks" by clicking the heart in the post that helped you.
    **Please mark the post that solves your problem by clicking on "Accept as Solution"
  • I would also love the option to have the default view of the Calender Filter be the Preset options. I am working in the new DOMO Stories and have a custom sized card where in its current form/size the wrench dropdown completely hides the "Presets" link so it's impossible to click! I just added this to the Ideas Exchange if you guys want to give it an upvote so it can get some visibility.

     

    https://dojo.domo.com/t5/Ideas-Exchange/Option-for-Presets-to-be-Default-View-Interactive-Date-Filter/idi-p/40518#M7123

This discussion has been closed.