Best mode - combine MTD and YTD
I have a problem with beast mode. I think the solution is easy, but I can´t figure out the correct function in beast mode.
We need to display sales of our team. Therefore I created a table with team names and sales MTD and Sales YTD.
My datasource includes a field called season (our business year is from May till April next year) which I use for my Sales YTD.
Unfortunately, I can´t figure out the MTD part, which is always based on the current month.
I tried this function in beast mode:
when MONTH(`Datum`)=MONTH(CURRENT_DATE()) and YEAR(`Datum`)=YEAR(CURRENT_DATE()) then
SUM((CASE when `Total` is null then 0 else `Total` end))
In return I always get 0 per person. If I add "this month" in my card builder the function works, but my YTD doesn´t anymore.
Do I need to add something in my MTD formula, because I think I have an issue with identifying dates (maybe?).
I wasn´t able to find anything close in other thread.
Many thanks for helping me!
- 7.3K All Categories
- 13 Getting Started in the Community
- 134 Beastmode & Analytics
- 1.8K Data Platform & Data Science
- 52 Domo Everywhere
- 2K Charting
- 994 Ideas Exchange
- 894 Connectors
- 236 Workbench
- 342 APIs
- 76 Apps
- 18 Governance & Productivity
- 233 Use Cases & Best Practices
- 49 News
- 473 Onboarding
- 570 日本支部