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.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 292 Workbench
- 4 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 95 SQL DataFlows
- 602 Datasets
- 2.1K Magic ETL
- 3.7K Visualize
- 2.4K Charting
- 695 Beast Mode
- 43 App Studio
- 39 Variables
- 658 Automate
- 170 Apps
- 441 APIs & Domo Developer
- 42 Workflows
- 5 DomoAI
- 32 Predict
- 12 Jupyter Workspaces
- 20 R & Python Tiles
- 386 Distribute
- 111 Domo Everywhere
- 269 Scheduled Reports
- 6 Software Integrations
- 113 Manage
- 110 Governance & Security
- 8 Domo University
- 30 Product Releases
- Community Forums
- 39 Getting Started
- 29 Community Member Introductions
- 98 Community Announcements
- Domo Community Gallery
- 4.8K Archive