Dynamic Weekly goals
We have 2 tables:
OrderDetail - which stores order info like date, sku, quantity, price, ect
SalesGoals - DateWeekStart, DateWeekEnd, SkuQuantityGoal, etc
Is there a way we can do a visualization that dynamically shows the weekly sales against weekly Goals?
I am new to this, so I am not sure the best way to set up the sql in workbench, and then create the visualization in a card.
thanks for any help anyone can give on this or direct me to the best place to find the answers
Brian
Best Answers
-
You would need to combine the data in Magic ETL so that it is one dataset. You would have two input datasets: order detail and sales goals. I would use a formula tile on your order detail to get the first day of the week for each order. You can use the following formula to do this (replace dt with your actual order date field:
DATE_SUB(`dt`, INTERVAL (DAYOFWEEK(`dt`) - 1) DAY)
You would then use a group by tile to group the orders by the first day of the week. You can then use a join tile and do a left join with your goals on the left and join on the first day of the week field and likely your sku.
This should get the data in the shape that you want so that you can build a card off of it. I have a few videos (link below) that may help you if you are unfamiliar with any of those tiles.
**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 -
All ETLs have settings that allow you different ways to control when you want your ETL to run. When editing the ETL, you can click on the icon that is just to the right of the zoom controls (it looks like 3 lines with dots on them). I would suggest having it run whenever either dataset is updated. This will ensure you output dataset is always up to date.
**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.0
Answers
-
You would need to combine the data in Magic ETL so that it is one dataset. You would have two input datasets: order detail and sales goals. I would use a formula tile on your order detail to get the first day of the week for each order. You can use the following formula to do this (replace dt with your actual order date field:
DATE_SUB(`dt`, INTERVAL (DAYOFWEEK(`dt`) - 1) DAY)
You would then use a group by tile to group the orders by the first day of the week. You can then use a join tile and do a left join with your goals on the left and join on the first day of the week field and likely your sku.
This should get the data in the shape that you want so that you can build a card off of it. I have a few videos (link below) that may help you if you are unfamiliar with any of those tiles.
**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 -
Thanks so much Mark!
I think I have things working fairly well….Attached are some images of my setup and card.
Questions:
- I noticed I has to 'Run' the dataset after I created the ETL - Will this dynamically update based on my schedule in workbench?
- If my imported excel file needs to be updated, do I need to delete the current one and re-add the input Dataset?.. and if so, will I need to recreate the steps from the join on? or can I update the Sheet right in Domo?.. what's the best way?
Really appreciate your help on this.
Brian
0 -
All ETLs have settings that allow you different ways to control when you want your ETL to run. When editing the ETL, you can click on the icon that is just to the right of the zoom controls (it looks like 3 lines with dots on them). I would suggest having it run whenever either dataset is updated. This will ensure you output dataset is always up to date.
**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.0 -
thanks again Mark!
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
- 755 Beast Mode
- 61 App Studio
- 41 Variables
- 693 Automate
- 178 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