Beastmode to return current month value? And what's the best card type to show the variance?
My dataset has these columns: year (int), month (int), target, actual
I created a BeastMode to return the current month (Aug) value for both target & actual, but instead of showing an actual value for Aug, it shows 0.
CASE
WHEN month
= MONTH(CURRENT_DATE()) THEN target
ELSE '0'
END
Since I want to see the variance for current month of both target & actual, what would be the best card to do that? Just the number value, I have already have a bar showing the variance for all months
Best Answer
-
Hi @verytiredgirl,
I'm glad I could help. You can simply adjust the Beast mode subtracting 1 from the CURRENT_DATE() or use the SUBDATE() function:
CASE
WHEN
Month
= MONTH(CURRENT_DATE()) - 1 ANDYear
= YEAR(CURRENT_DATE()) THENActual
ELSE 0
END
If you found this post helpful, please use 💡/💖/👍/😊 below! If it solved your problem, don't forget to accept the answer.
1
Answers
-
Can you share a screenshot of your analyzer view? For your second question, I would a multi-value gauge card. I like using these to show a single variance between two values.
Your beastmode should work, you need to include year in your beastmode logic as well or else values from other years would be included.
If I solved your problem, please select "yes" above
0 -
Hello @verytiredgirl,
There are no issues visualizing the Current Month Target and Actual. If you have data spanning multiple years, please include the year in the Beast Mode formula. Examples are provided for reference:
CASE
WHENMonth
= MONTH(CURRENT_DATE()) ANDYear
= YEAR(CURRENT_DATE()) THENActual
ELSE 0
ENDand
CASE
WHENMonth
= MONTH(CURRENT_DATE()) ANDYear
= YEAR(CURRENT_DATE()) THENTarget
ELSE 0
ENDThen you can visualize with Filled Gauge chart:
or Progress Bar:
Here is the sample table I'm using:
If you found this post helpful, please use 💡/💖/👍/😊 below! If it solved your problem, don't forget to accept the answer.
1 -
Hi I added year in my BeastMode, but the current value still show '0.00'
0 -
Hi @verytiredgirl,
The current month is 9. From what I can see from the table, there is no data for the month of September. Could you please check?
If you found this post helpful, please use 💡/💖/👍/😊 below! If it solved your problem, don't forget to accept the answer.
1 -
Thanks for catching that! I forgot it's an end of month kind of report, I need to update my Beast Mode to reflect last month then, thank you!
0 -
Hi @verytiredgirl,
I'm glad I could help. You can simply adjust the Beast mode subtracting 1 from the CURRENT_DATE() or use the SUBDATE() function:
CASE
WHEN
Month
= MONTH(CURRENT_DATE()) - 1 ANDYear
= YEAR(CURRENT_DATE()) THENActual
ELSE 0
END
If you found this post helpful, please use 💡/💖/👍/😊 below! If it solved your problem, don't forget to accept the answer.
1
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 295 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 97 SQL DataFlows
- 608 Datasets
- 2.1K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 712 Beast Mode
- 50 App Studio
- 39 Variables
- 668 Automate
- 170 Apps
- 446 APIs & Domo Developer
- 45 Workflows
- 7 DomoAI
- 34 Predict
- 14 Jupyter Workspaces
- 20 R & Python Tiles
- 391 Distribute
- 111 Domo Everywhere
- 274 Scheduled Reports
- 6 Software Integrations
- 116 Manage
- 113 Governance & Security
- Domo Community Gallery
- 31 Product Releases
- 9 Domo University
- 5.3K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 104 Community Announcements
- 4.8K Archive