POP Beast Mode
Hoping someone can help me figure out why my POP Beast Mode calculation returns 0% in my charts. I want to compare current quarter to last quarter. I may also modify the calculation to compare last quarter to 2 quarters ago. I am only using two fields from my dataset, similiar to this table and my dates are always the 1st day of each month.
Month | Attributed Pipeline |
1/1/2018 | $1,000 |
2/1/2018 | $1,500 |
3/1/2018 | $6,000 |
4/1/2018 | $9,000 |
This is my Beast Mode calculation that returns 0% in my charts. I tried SUM before my case statement, but that did not change the results.
(CASE WHEN ((year(`Month`)=year(curdate())) AND (quarter(`Month`)=quarter(CURDATE()))) THEN `Attributed Pipeline` END / CASE WHEN (quarter(curdate())=1) THEN (CASE WHEN ((year(`Month`)=(year(curdate()) - 1)) AND (quarter(`Month`)=4)) THEN `Attributed Pipeline` END ) ELSE (CASE WHEN ((year(`Month`)=year(curdate())) AND (quarter(`Month`)=(quarter(CURDATE()) -1))) THEN `Attributed Pipeline` END ) END) -1
Thanks in advance for any help!!
Comments
-
At a high level your beast mode looks conceptually ok. What kind of chart are you using and where is the value showing up as 0?
Is that what your data actually looks like, or do you have more rows per month that would need to be summed up?
What I'd do is break it up by the components (numerator and denominator) and then see if those values come up as expected. Is your numerator (the sum of current quarter dollars) also zero? Get that number right, then move on to the denominator (previous month)
sum(
CASE
WHEN year(`Month`)=year(curdate()) AND quarter(`Month`)=quarter(CURDATE())
THEN `Attributed Pipeline`
END)
/
sum(
CASE
WHEN quarter(curdate())=1
THEN (CASE
WHEN year(`Month`)=year(curdate()) - 1 AND quarter(`Month`)=4
THEN `Attributed Pipeline`
END)
ELSE (CASE
WHEN year(`Month`)=year(curdate()) AND quarter(`Month`)=quarter(CURDATE()) -1
THEN `Attributed Pipeline`
END)
END)
-1Aaron
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"1 -
You could also display the POP veriance using the Period over Period Variance bar line card:
This way you wouldn't need any beast modes. This card was made from the table you posted
0
Categories
- All Categories
- 1.9K Product Ideas
- 1.9K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 303 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3K Transform
- 104 SQL DataFlows
- 640 Datasets
- 2.2K Magic ETL
- 4K Visualize
- 2.5K Charting
- 769 Beast Mode
- 72 App Studio
- 43 Variables
- 718 Automate
- 185 Apps
- 462 APIs & Domo Developer
- 57 Workflows
- 14 DomoAI
- 40 Predict
- 17 Jupyter Workspaces
- 23 R & Python Tiles
- 402 Distribute
- 116 Domo Everywhere
- 277 Scheduled Reports
- 9 Software Integrations
- 135 Manage
- 132 Governance & Security
- 8 Domo Community Gallery
- 44 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 111 Community Announcements
- 4.8K Archive