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.5K Connect
- 1.2K Connectors
- 297 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 729 Beast Mode
- 54 App Studio
- 40 Variables
- 678 Automate
- 173 Apps
- 451 APIs & Domo Developer
- 46 Workflows
- 8 DomoAI
- 34 Predict
- 14 Jupyter Workspaces
- 20 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 121 Manage
- 118 Governance & Security
- Domo Community Gallery
- 32 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive