Filter Based on Percentage Change of Chart

I'm trying to filter out any changes above X%
This is from the Flex table. If I need to create a new field how would I calculate that?
Best Answer
-
Hi @Josh_Evans20,
Here's an example of calculating the percentage difference in Beast Mode:
(
ZZ_VALUE_THIS_M
-ZZ_VALUE_LAST_M
)/((ZZ_VALUE_THIS_M
+ZZ_VALUE_LAST_M
)/2)This month's turnover (ZZ_VALUE_THIS_M):
SUM(CASE WHEN YEAR(CURRENT_DATE()) = YEAR(
Date
) AND MONTH(CURRENT_DATE()) = MONTH(Date
) THENParts Kits Value
ELSE 0 END)Previous month's turnover (ZZ_VALUE_LAST_M):
SUM(CASE WHEN YEAR(CURRENT_DATE()) = YEAR(
Date
) AND MONTH(CURRENT_DATE())-1 = MONTH(Date
) THENParts Kits Value
ELSE 0 END)Filter formula (ZZ_FILTER). You can customize it to suit your requirements. You can also implement a slider variable or free input variable to easily select the filtering value for the difference.
CASE
WHEN (ZZ_VALUE_THIS_M
-ZZ_VALUE_LAST_M
)/((ZZ_VALUE_THIS_M
+ZZ_VALUE_LAST_M
)/2) > 0 THEN 'Above'
ELSE 'Below'
ENDHere is the result using the HTML table:
You can adjust the table by selecting the filter:
If you found this post helpful, please use 💡/💖/👍/😊 below! If it solved your problem, don't forget to accept the answer.
1
Answers
-
Hello @Josh_Evans20,
I couldn't achieve this with the Flex table, but it's possible with other cards like the Mega table, Line graph, Bar chart, and so on. In all instances, you'll need to perform your Difference calculation in Beast Mode and then filter based on the created calculation field.
If you found this post helpful, please use 💡/💖/👍/😊 below! If it solved your problem, don't forget to accept the answer.
0 -
How does a percentage change work in a beast mode? As in taking last month and this month to get the change?
0 -
Hi @Josh_Evans20,
Here's an example of calculating the percentage difference in Beast Mode:
(
ZZ_VALUE_THIS_M
-ZZ_VALUE_LAST_M
)/((ZZ_VALUE_THIS_M
+ZZ_VALUE_LAST_M
)/2)This month's turnover (ZZ_VALUE_THIS_M):
SUM(CASE WHEN YEAR(CURRENT_DATE()) = YEAR(
Date
) AND MONTH(CURRENT_DATE()) = MONTH(Date
) THENParts Kits Value
ELSE 0 END)Previous month's turnover (ZZ_VALUE_LAST_M):
SUM(CASE WHEN YEAR(CURRENT_DATE()) = YEAR(
Date
) AND MONTH(CURRENT_DATE())-1 = MONTH(Date
) THENParts Kits Value
ELSE 0 END)Filter formula (ZZ_FILTER). You can customize it to suit your requirements. You can also implement a slider variable or free input variable to easily select the filtering value for the difference.
CASE
WHEN (ZZ_VALUE_THIS_M
-ZZ_VALUE_LAST_M
)/((ZZ_VALUE_THIS_M
+ZZ_VALUE_LAST_M
)/2) > 0 THEN 'Above'
ELSE 'Below'
ENDHere is the result using the HTML table:
You can adjust the table by selecting the filter:
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
- Product Ideas
- 2.1K Ideas Exchange
- Connect
- 1.3K Connectors
- 309 Workbench
- 7 Cloud Amplifier
- 10 Federated
- Transform
- 665 Datasets
- 120 SQL DataFlows
- 2.3K Magic ETL
- 827 Beast Mode
- Visualize
- 2.6K Charting
- 90 App Studio
- 46 Variables
- Automate
- 197 Apps
- 489 APIs & Domo Developer
- 94 Workflows
- 24 Code Engine
- AI and Machine Learning
- 23 AI Chat
- 4 AI Projects and Models
- 18 Jupyter Workspaces
- Distribute
- 119 Domo Everywhere
- 283 Scheduled Reports
- 11 Software Integrations
- Manage
- 145 Governance & Security
- 12 Domo Community Gallery
- 49 Product Releases
- 13 Domo University
- Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 116 Community Announcements
- 5K Archive