Barchart with a series of 2 different types (sorting issue)
Hi,
I've build a bar chart where I can see sales by sales person. I have a beastmode variable that calculates sales and I dragged into the Y-Axis field and I put into the series field a product field that allows me to distinguish between food and drink items.
Now I am trying to sort the bar by sales descending, but it only sorts by one of the items. Meaning that the order is true if just focusing on sales of food items, but not if you look at food item and dirnk item aggregated. Anyone an idea of what is going on??
Thanks in advance !!
Comments
-
Hi @user084060
Could you post some anonymized examples of your chart to give a better understanding of what you're seeing compared to what you're expecting?
Is my understanding correct in that you have the sales person on the x-axis and the sales amount on the y-axis with the type of product as your series?
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
Thinking about this some more, it's likely because Domo is treating your two series data points as separate rather than treating it as a single total over the sales person. You could utilize a window function to get the sum for each salesperson irregardless of the product type.
SUM(SUM(`sales_amount`)) OVER (PARTITION BY `sales_person`)
And then toss that into your sort. This is assuming `sales_amount` is the sales amount field and `sales_person` is the sales person field. You'll likely need to rename these to your correct columns.
You'd need to make sure you have window functions enabled in your instance. If you don't talk with your CSM as it's just a feature switch.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1 -
I tried that and it still seem not to sort the overall volume, but only by the volume of one of the items.
I edited my initial post, I hope that helps?!
0 -
post data and a screenshot that shows your settings. I'm pretty confident (without having tested ? that @GrantSmith 's window function should work if you sort by it.
Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0
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