Dynamic Filtering of cards

I am trying to create 2 dynamic date filters with no luck.

 

MTD - up to end of previous week

A rolling 13 month

 

Has anyone done this before?

Thanks in advance for the help.

Best Answer

  • mindbender
    mindbender Member
    Answer ✓

    That is awesome. Thank you so much and thanks for the link to the documentation. iw ill read through that as well.

     

    I appreciate your help.

Answers

  • How are you wanting to use the date filters? If can provide a bit more info on usage, i'll see if I can't write up something to help.

     

    Sincerely,

    ValiantSpur

  • They woudl be used as the data parameters for several types of reports. I have attached 3 reports where the data woudl be exactly as it is on the charts - it would just be the dates it is filtered on that woudl be MTD-to prev week and Rolling 13 month

     

    Thanks for looking at this

  • For ease of use I broke this into 2 date filters. You can create each in a beastmode and set them as filters.

     

    Select all dates within the last 13 months:

    CASE WHEN `date` >= DATE_SUB(DATE_FORMAT(CURRENT_DATE, '%Y-%m-01'), INTERVAL 13 MONTH) THEN 1 ELSE 0 END

    (To use the above filter, set value = to 1)

     

    Select  MTD up to end of previous week:

    CASE WHEN MONTH(`date`) = MONTH(CURRENT_DATE) AND YEAR(`date`) = YEAR(CURRENT_DATE) AND WEEK(`date`) < WEEK(CURRENT_DATE) THEN 1 ELSE 0 END

    (To use the above filter, set value = to 1)

     

    You should be able copy and paste the code, just replace the `date` field with your own date field.

     

    Let me know if you have any questions.

     

    Sincerely,

    ValiantSpur

     

    **Please mark "Accept as Solution" if this post solves your problem
    **Say "Thanks" by clicking the "heart" in the post that helped you.

  • I have created the calulations and clicked the share to dataset checkbox and I see the 2 calculations listed under measurements. But I am not sure how to apply them or what you mean but to use them set value =1.

     

     

  • Once you have each of the calculations set as BeastModes.

     

    You can drag them to the Filters section. See below for screenshot:

    Screen Shot 2018-02-20 at 10.50.14 AM.png

     

    When you drag it up to the filter section, set each value to "Is 1"

    Screen Shot 2018-02-20 at 10.50.57 AM.png

     

    Here's a link to the long explanation of filters: https://knowledge.domo.com/Visualize/Adding_Cards_to_Domo/KPI_Cards/KPI_Card_Building_Part_2:_The_Analyzer/045Adding_Filters_to_Your_Chart

     

    Let me know if you need any other assistance.


    Sincerely,
    ValiantSpur

  • mindbender
    mindbender Member
    Answer ✓

    That is awesome. Thank you so much and thanks for the link to the documentation. iw ill read through that as well.

     

    I appreciate your help.

  • AK
    AK Member

    Hello,

     

    New to Domo and getting a lot of good info from these discussions!

     

    I want to create a beast mode calculation for "Previous Quarter" and "Same Quarter Previous Year".

     

    Any tips on how we could write those logics would be great.

     

    Thanks,

    AK

  • AK
    AK Member

    @Valiant : I have been trying to work through the suggestion you had provided in this thread and would really appreciate if you can just spend 10-mins on a quick call with me on the same. I feel i am really close and your expert set of eyes would definitely help on the same.

     

    Please let me know if this is something you can help on ?

     

    Thanks,

    AK

This discussion has been closed.