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.5K Connect
- 1.2K Connectors
- 296 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 614 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 729 Beast Mode
- 53 App Studio
- 40 Variables
- 677 Automate
- 173 Apps
- 451 APIs & Domo Developer
- 45 Workflows
- 8 DomoAI
- 34 Predict
- 14 Jupyter Workspaces
- 20 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 121 Manage
- 118 Governance & Security
- Domo Community Gallery
- 32 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive