Case statement with two conditions
I have a case statement below for inventory to create a pie graph.
WHEN `AVAILABLE_COUNT` <= 20 THEN 'Out of Stock'
WHEN `AVAILABLE_COUNT` >= 40 THEN 'Sufficient Stock'
Else 'Low levels'
The only problem is that I have 2 warehouses I included as filters. However, when the data populates it separates the two locations as different entity and counts it separately.
If warehouse A has inventory, but warehouse B has no inventory, then it counts for two status.
Even if both warehouses have inventory, it still counts as two status because of location.
I want to have the total inventory counted as one status in both warehouses.
Sorry, if this is confusing. Let me know if you need any clarifications.
What should include in this beast mode calcuation?
Can you show a sample of your data/scenario?Domo Arigato!
**Say 'Thanks' by clicking the thumbs up in the post that helped you.
**Please mark the post that solves your problem as 'Accepted Solution'0
A way to go around the issue, but nto solve it as such, would be to combine the two warehouses using ETL then either create a separate DataSet or append it to the original and calling it Warehouse A+B in the Warehosue column.
Not as clean as the ideal but would work in principle.0
Could you show how I would do it in ETL. I am pretty new to this.
I would suggest starting with the tutorials (Dataflows and Group by Function) then but I will give you info on the function you need to use.
The function is Group By
1 Coiumn that identifies the grouping is Item_ID
2 Name fo the new aggregated column can be Available Stock
3 Column to aggegate the fill the new column is Available_Count
4 How to aggegate column is Sum
This will generate a table with to columns
Item_ID, each item will only come up once, 149 lines in total
Available Stock, will have the combined count for each time.
After that you can use the new table as a data set or combine it with the original.
As I said it is not as clean as ideal but it will get you there. Ideally this would be done in beastmode but I cant think of a way to do it.0
- 10.5K All Categories
- 3 Connect
- 913 Connectors
- 250 Workbench
- 458 Transform
- 1.7K Magic ETL
- 69 SQL DataFlows
- 476 Datasets
- 182 Visualize
- 249 Beast Mode
- 2.1K Charting
- 11 Variables
- 77 Cards, Dashboards, Stories
- 16 Automate
- 354 APIs & Domo Developer
- 88 Apps
- 3 Workflows
- 20 Predict
- 5 Jupyter Workspaces
- 15 R & Python Tiles
- 245 Distribute
- 62 Domo Everywhere
- 242 Scheduled Reports
- 20 Manage
- 41 Governance & Security
- 168 Product Ideas
- 1.2K Ideas Exchange
- 9 Community Forums
- 27 Getting Started
- 14 Community Member Introductions
- 55 Community News
- 4.5K Archive