Need help with beast modes to show yesterday's invoice total amount, and previous year, current date
I'm trying to create 2 beast modes to show yesterday's Total Invoice Amount and same day last year's Total Invoice Amount. For example, 10/27/2022, and 10/28/21
Yesterday: case when year(`INVOICE_DATE`) = year(CURDATE()) and MONTH(`INVOICE_DATE`) = MONTH(CURDATE()) then `INVOICE_TOTAL_AMOUNT` end --- This formula works
Same day last year: case when year(`INVOICE_DATE`)=YEAR(CURDATE()) -1 and YEAR(INVOICE_DATE) = MONTH(CURDATE()) then INVOICE_TOTAL_AMOUNT
Same day formular/code does not work.
Please help me. Thank you so much
Best Answer
-
Hi @anh_tr_huynh4 . Here's a video explanation of what you need to do: https://www.loom.com/share/70b71aee2ec44253bb4638c9862f50cb
Anyway, you're on the right track, but I don't think your formulas are doing what you want them to do. By using the year and month functions, you're really saying to get a sum of invoice amounts for an entire month and not just yesterday.
Hope the video helps
John Le
Dashboarddudes.com
John Le
You're only one dashboard away.
Click here for more video solutions:
2
Answers
-
Looks like you're missing "END" in the second formula
1 -
Hi @anh_tr_huynh4 . Here's a video explanation of what you need to do: https://www.loom.com/share/70b71aee2ec44253bb4638c9862f50cb
Anyway, you're on the right track, but I don't think your formulas are doing what you want them to do. By using the year and month functions, you're really saying to get a sum of invoice amounts for an entire month and not just yesterday.
Hope the video helps
John Le
Dashboarddudes.com
John Le
You're only one dashboard away.
Click here for more video solutions:
2 -
@DashboardDude I followed your guidance and the formulas worked. Thank you for your help. Cheers
1
Categories
- 10.5K All Categories
- 8 Connect
- 918 Connectors
- 250 Workbench
- 470 Transform
- 1.7K Magic ETL
- 69 SQL DataFlows
- 477 Datasets
- 195 Visualize
- 253 Beast Mode
- 2.1K Charting
- 11 Variables
- 17 Automate
- 354 APIs & Domo Developer
- 89 Apps
- 3 Workflows
- 20 Predict
- 5 Jupyter Workspaces
- 15 R & Python Tiles
- 247 Distribute
- 63 Domo Everywhere
- 243 Scheduled Reports
- 21 Manage
- 42 Governance & Security
- 174 Product Ideas
- 1.2K Ideas Exchange
- 12 Community Forums
- 27 Getting Started
- 14 Community Member Introductions
- 55 Community News
- 4.5K Archive