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
- 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