YTD Previus Year
Hello,
I want to make a dashboard where i will have 2 single value type cards, one with the YTD for the current year and the other with YTD for the previus year. I've computed both values trough ETL with the rank/window tile. The column has both the values for the previous and current YTD (see image below). However, this method has issues for a dynamic dashboard with filters.
What i would like to have is something like this (see image below).
With ETL, how can i achieve something like this? Thank you
Best Answer
-
@SGPA You could also create a another date column using a formula that is the previous year (ex: Jan/22 would have Jan/21 in the new column) and then join the table on itself using the original date column and the previous year column and just rename the AVG YTD column from the previous year join to AVG YTD Previous Year.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**
1
Answers
-
I’d recommend reformatting your dataset to use a custom date offset dimension dataset. This will allow the interactions with the page date filters and simplify your data structure. I’ve done a write up on this previously here: https://dojo.domo.com/main/discussion/53481/a-more-flexible-way-to-do-period-over-period-comparisons#latest
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**2 -
Assuming you have data in every month, you can accomplish this with a group by tile followed by a rank and window tile. Use a group by tile to group by your month/year (as a date field) and choose Average for your aggregation type. Add the Rank and Window tile and choose the Lag function and create a column called Previous Year and select your average column that you created in the group by tile and enter an offset of 12 and sort by your date field ascending.
**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.1 -
@SGPA You could also create a another date column using a formula that is the previous year (ex: Jan/22 would have Jan/21 in the new column) and then join the table on itself using the original date column and the previous year column and just rename the AVG YTD column from the previous year join to AVG YTD Previous Year.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**
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
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 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