Beast Mode calculation
Hello,
I'm creating a visualization that aims to show orders that have a specific piece of equipment in it. My database has multiple rows of 'SO #', 1 row for a different type of equipment ordered. I want to see how many orders out the total have number '100' in column 'Equipment #'. In other words, for each 'SO #' I want to mark it as a 1 if it includes '100' in column 'Equipment #' and 0 if it doesn't include '100'.
Thanks!!
Best Answer
-
I would do it in a dataflow. In Magic you would use the formula tile to get the flag on rows with a 100 in them and then use the group by tile to group on SO # and then join on SO # back to your granular data. Then you'd have a flag for each SO # that has an order product in it with 100 as shown in my last screenshot above. See below and let me know if you need more details:
If I solved your problem, please select "yes" above
2
Answers
-
Hi zuchu, see below for the beastmode to use:
CASE WHEN 'SO #' LIKE '%100%' THEN 1 ELSE 0 END
Review your data carefully because this would also pull in anything like '100' will be marked as 1. So, for example, 1001 would be counted even though it is not 100. If your order numbers don't have anything before or after the 100 you can remove one or both of the '%' signs.
If I solved your problem, please select "yes" above
0 -
@colemenwilson sorry if I caused some misunderstanding. Correct me if I'm wrong but but creating that case statement I'm looking at SO# that are like 100. I want to look at every single quote as a separate case, then look at 'Equipment #' (that's another column) and if for any 'SO #' there is an entry stating that 'Equipment #' is '100' then classify that order as 1, otherwise if the order didn't have 'Equipment #' 100, just leave it 0. Does that makes sense now??
0 -
Sounds like you just need to look at the Equipment # column for your beast mode, which evaluates by row automatically. It would look like this:
CASE
WHEN
'Equipment #' LIKE '%100%'
THEN
1
ELSE
0
END
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.0 -
Okay I think I see what you are saying. You want an output like this right:
If I solved your problem, please select "yes" above
0 -
@colemenwilson thats exactly what my dataset looks like!! Once I have the the flagged version, I'll use distinct SO # and will have my answer :) Do you know how to make that calculation?
0 -
I would do it in a dataflow. In Magic you would use the formula tile to get the flag on rows with a 100 in them and then use the group by tile to group on SO # and then join on SO # back to your granular data. Then you'd have a flag for each SO # that has an order product in it with 100 as shown in my last screenshot above. See below and let me know if you need more details:
If I solved your problem, please select "yes" above
2
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