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.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 737 Beast Mode
- 55 App Studio
- 40 Variables
- 684 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 46 Workflows
- 10 DomoAI
- 35 Predict
- 14 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 123 Manage
- 120 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive