Setting Goals for each Quarter in Bar Chart
I am trying to set goals for each individual quarter. My data is currently represented as a stacked bar chart and would like to make the goals a line. My series is calculating the count of each type of lead for each fiscal quarter. I am having trouble with my beastmode calculation setting the goal value of leads for each fiscal quarter. This is how my calculation is currently and I am getting a syntax error:
CASE
WHEN `Created Date` = '2018-Q1' THEN Count(`Type`='518')
WHEN `Created Date` = '2018-Q2' THEN COUNT(`Type`= '1224')
WHEN `Created Date` = '2018-Q3' THEN COUNT (`Type`='1373')
WHEN `Created Date` = '2018-Q4' THEN COUNT (`Type`= '1778')
END
I would like the goals for each quarter to be placed on a line on top of the bar graph.
Anyone have a solution?
Best Answer
-
Looks like in your beast mode you're trying to either override the count function or set the value of the count with = syntax. Case statements won't work that way.
It should be more like
CASE
WHEN `Created Date` = '2018-Q1' THEN 518
WHEN `Created Date` = '2018-Q2' THEN 1224
WHEN `Created Date` = '2018-Q3' THEN 1373
WHEN `Created Date` = '2018-Q4' THEN 1778
ENDThere may still be an issue with the way that date value is stored and compared here.
Backing up, your approach of individualized goals with a beast mode is good. Here's how I've solved this question in the past.
This is a "line and stacked bar" chart, with each goal or value as an independent beast mode.
Goal beast mode, similar to yours:
case
when QUARTER(date) = 1 then 1000
when QUARTER(date) = 2 then 1250
when QUARTER(date) = 3 then 1500
when QUARTER(date) = 4 then 1750
endValue 1 beast mode:
case when `Group` = 'Group 1' then `Value1` end
Value 2 beast mode:
case when `Group` = 'Group 2' then `Value1` end
Make sure to have the goal line first. Otherwise it shows up as a segment on the stacked bar.
Let me know if you have questions about this!
Aaron
MajorDomo @ Merit Medical
**Say "Thanks" by clicking the heart in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0
Answers
-
Looks like in your beast mode you're trying to either override the count function or set the value of the count with = syntax. Case statements won't work that way.
It should be more like
CASE
WHEN `Created Date` = '2018-Q1' THEN 518
WHEN `Created Date` = '2018-Q2' THEN 1224
WHEN `Created Date` = '2018-Q3' THEN 1373
WHEN `Created Date` = '2018-Q4' THEN 1778
ENDThere may still be an issue with the way that date value is stored and compared here.
Backing up, your approach of individualized goals with a beast mode is good. Here's how I've solved this question in the past.
This is a "line and stacked bar" chart, with each goal or value as an independent beast mode.
Goal beast mode, similar to yours:
case
when QUARTER(date) = 1 then 1000
when QUARTER(date) = 2 then 1250
when QUARTER(date) = 3 then 1500
when QUARTER(date) = 4 then 1750
endValue 1 beast mode:
case when `Group` = 'Group 1' then `Value1` end
Value 2 beast mode:
case when `Group` = 'Group 2' then `Value1` end
Make sure to have the goal line first. Otherwise it shows up as a segment on the stacked bar.
Let me know if you have questions about this!
Aaron
MajorDomo @ Merit Medical
**Say "Thanks" by clicking the heart in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0 -
Thank you! That worked.
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 754 Beast Mode
- 61 App Studio
- 41 Variables
- 693 Automate
- 178 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive