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.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
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 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