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.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 738 Beast Mode
- 56 App Studio
- 40 Variables
- 684 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 46 Workflows
- 10 DomoAI
- 35 Predict
- 14 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 123 Manage
- 120 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive