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.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 101 SQL DataFlows
- 624 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 750 Beast Mode
- 60 App Studio
- 41 Variables
- 692 Automate
- 177 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 397 Distribute
- 114 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 127 Manage
- 124 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive