Date Range - Last 3 mo compared to same months last year.
Hi there,
I am trying to use a multi-value card in Domo and I wanted to compare the last 3 months to the same 3 months of the prior year.
i.e. Dec 23, Jan 24, Feb 24 compared to Dec 22, Jan 23, Feb 23.
I wasn't sure how exactly the compare to months works. Whether or not that compare to __ months would be alluding to x months ago or how it's justified.
It's not very easy to trouble shoot unfortunately so I was hoping that someone might have the answer already, so I don't have to dig in for too long :) Thanks!
Best Answer
-
You can do this with the multi-value gauge card, which is one of my favorite cards. You are going to want to do a few things to make this work.
First, set your date range filter to the last 16 months. This will allow the card to use data back to December 2022 as it counts the current month as a month.
Second, create a beast mode that puts your date field into the 3 month groups like this:
CEILING(
period_diff(date_format(CURRENT_DATE(), '%Y%m'), date_format(date
, '%Y%m'))
/3
)It can be helpful to start in a table card and see how this beast mode will group your data.
As you can see it is grouping your dates into different numbered groups. We are going to use the beast mode in the group by and the sorting in your gauge card.
In your chart properties - Change Value Options - Data select First and Last Values
This will tell the card to use the first 3 month group and the last 3 month group for comparison.
The rest of the chart properties will depend on what exactly you want to display.
**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
-
You can do this with the multi-value gauge card, which is one of my favorite cards. You are going to want to do a few things to make this work.
First, set your date range filter to the last 16 months. This will allow the card to use data back to December 2022 as it counts the current month as a month.
Second, create a beast mode that puts your date field into the 3 month groups like this:
CEILING(
period_diff(date_format(CURRENT_DATE(), '%Y%m'), date_format(date
, '%Y%m'))
/3
)It can be helpful to start in a table card and see how this beast mode will group your data.
As you can see it is grouping your dates into different numbered groups. We are going to use the beast mode in the group by and the sorting in your gauge card.
In your chart properties - Change Value Options - Data select First and Last Values
This will tell the card to use the first 3 month group and the last 3 month group for comparison.
The rest of the chart properties will depend on what exactly you want to display.
**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 -
Also, if you have data from the current month coming in and you don't want it to be considered, you can add a beast mode that looks like this and add it to the filters to remove it.
CASE WHEN LAST_DAY(CURRENT_DATE()) = LAST_DAY(date) THEN 'Exclude' ELSE 'Include' END
**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 That was extremely helpful! Thank you so much!
1
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 737 Beast Mode
- 56 App Studio
- 40 Variables
- 684 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 46 Workflows
- 10 DomoAI
- 35 Predict
- 14 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 123 Manage
- 120 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive