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
- 1.9K Product Ideas
- 1.9K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 305 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3K Transform
- 107 SQL DataFlows
- 648 Datasets
- 2.2K Magic ETL
- 4K Visualize
- 2.5K Charting
- 775 Beast Mode
- 75 App Studio
- 43 Variables
- 734 Automate
- 186 Apps
- 471 APIs & Domo Developer
- 63 Workflows
- 14 DomoAI
- 40 Predict
- 17 Jupyter Workspaces
- 23 R & Python Tiles
- 403 Distribute
- 117 Domo Everywhere
- 277 Scheduled Reports
- 9 Software Integrations
- 137 Manage
- 134 Governance & Security
- 8 Domo Community Gallery
- 44 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 113 Community Announcements
- 4.8K Archive