Need Help Changing to LAST 12 Months and sorting in proper order

The Card below shows the total call volume by month, and I have a quick filter to modify the number of years.
I created the following beast modes.
Standard Date (X Axis)
DATE_ADD(addTimestamp
,
INTERVAL
(YEAR(CURRENT_DATE()) - YEAR((addTimestamp
)))
year)
Count of 'Addtimestamp' y Axis
Reported Years for the Series ( Filtered
YEAR(addTimestamp
)
Number of Years - (With Quick filter so I can choose the number of years)
YEAR(CURRENT_DATE()) - YEAR(addTimestamp
)
QUESTION: I need to change this to the last 12 months but still maintain the years and PUT THE MONTHS IN ORDER of LAST 12 MONTHS. Like this:
Comments
-
I think you could create a BeastMode for your sort:
MOD(
MONTH(`addTimeStamp`)+12 - month(current_date()),
12
)
Add 12 to your month and subtract the current month. Then use modulo 12. If the current month is March:
- March + 12 - March = 12, Modulo 12 = 0
- April + 12 - March = 13, Modulo 12 = 1
- …
- January + 12 - March = 10, Modulo 12 = 10
- February + 12 - March = 11, Modulo 12 = 11
This would only work with "graph-by" months, but I think if you added in a second sort on DAY(`addTimeStamp`), it should be pretty robust
Please 💡/💖/👍/😊 this post if you read it and found it helpful.
Please accept the answer if it solved your problem.
0 -
Thanks @DavidChurchman that worked!
1
Categories
- All Categories
- Product Ideas
- 2K Ideas Exchange
- Connect
- 1.3K Connectors
- 308 Workbench
- 7 Cloud Amplifier
- 10 Federated
- Transform
- 661 Datasets
- 117 SQL DataFlows
- 2.2K Magic ETL
- 821 Beast Mode
- Visualize
- 2.6K Charting
- 85 App Studio
- 46 Variables
- Automate
- 193 Apps
- 483 APIs & Domo Developer
- 85 Workflows
- 23 Code Engine
- AI and Machine Learning
- 23 AI Chat
- 3 AI Projects and Models
- 18 Jupyter Workspaces
- Distribute
- 116 Domo Everywhere
- 283 Scheduled Reports
- 11 Software Integrations
- Manage
- 142 Governance & Security
- 10 Domo Community Gallery
- 49 Product Releases
- 13 Domo University
- Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 115 Community Announcements
- 5K Archive