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!
- 10.7K All Categories
- 13 Getting Started in the Community
- 35 Beastmode & Analytics
- 2.1K Data Platform & Data Science
- 59 Domo Everywhere
- 2.7K Charting
- 2.5K Ideas Exchange
- 1.3K Connectors
- 362 Workbench
- 303 Use Cases & Best Practices
- 500 APIs
- 118 Apps
- 48 News
- 753 Onboarding
- 1.1K 日本支部
- Private Company Board