How to Create WTD, MTD, QTD, YTD on one Chart
I received a request to create a chart to show KPI with WTD … YTD on a single chart.
Image below is the example:
The Closest I've gotten is;
I created a dimeson that flags the 'WTD' dates as a Y/N, then created a beast mode doing a case statement for when the Date flags are 'Y.' I've done the same for the other KPI, but it will just make the table wide instead of being able to place them on separate rows
I don't know how to add the separate KPI on different rows.
Best Answer
-
You can accomplish this at the ETL level. You'll need transforms for the WTD, MTD, QTD, YTD ranges along with calculations in each of those transforms aggregating your measurable fields.
1
Answers
-
Last Week:
CASE WHEN WEEK(`DateField`) = WEEK(CURRENT_DATE())-1 THEN 'In' ELSE 'Out' END
MTD:
CASE WHEN `DateField` > LAST_DAY(CURRENT_DATE()) - INTERVAL 1 MONTH AND `DateField` <= CURRENT_DATE() THEN 'In' ELSE 'Out' END
QTD:
CASE WHEN QUARTER(`DateField`) = QUARTER(CURRENT_DATE()) AND YEAR(`DateField`) = YEAR(CURRENT_DATE()) AND `DateField` <= CURRENT_DATE() THEN 'In' ELSE 'Out' END
YTD:
CASE WHEN YEAR(`DateField`) = YEAR(CURRENT_DATE()) AND `DateField` <= CURRENT_DATE() THEN 'In' ELSE 'Out' ENDEtc…
If I solved your problem, please select "yes" above
0 -
Hey @ColemenWilson,
Thanks for the reply, but I think the Beast mode makes sense, but I cant position the different KPI on Separate rows. The request is to get WTD sales in Column 1, and Sales on Row 1, and Plan on Row 2
I'm currently using the mega table visual, and can't figure out how to break out the KPI by Time slice
0 -
You can accomplish this at the ETL level. You'll need transforms for the WTD, MTD, QTD, YTD ranges along with calculations in each of those transforms aggregating your measurable fields.
1 -
Re-read your initial question - you would need to do some work in ETL as @jessdoe pointed out. You can re-purpose your beastmodes to save time. Just use the formula tile in magic.
If I solved your problem, please select "yes" above
0
Categories
- All Categories
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 311 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3.8K Transform
- 656 Datasets
- 115 SQL DataFlows
- 2.2K Magic ETL
- 811 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 80 App Studio
- 45 Variables
- 771 Automate
- 190 Apps
- 481 APIs & Domo Developer
- 77 Workflows
- 23 Code Engine
- 36 AI and Machine Learning
- 19 AI Chat
- AI Playground
- AI Projects and Models
- 17 Jupyter Workspaces
- 410 Distribute
- 120 Domo Everywhere
- 280 Scheduled Reports
- 10 Software Integrations
- 142 Manage
- 138 Governance & Security
- 8 Domo Community Gallery
- 48 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 114 Community Announcements
- 4.8K Archive