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.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