Percent of Series?
Hi team, this feels like it should be very simple but I'm missing the key ingredient.
I currently have "Percent of Category" as the data label. I'm using an Overlay chart.
What is happening:
π« Green / Green + Blue = Displayed Percentage
What I need to happen:
β Green / Blue = Displayed Percentage
Any ideas?
Best Answers
-
@Data_Devon I'd suggest using a tooltip for your data label instead of the default macros. Then you can create the percentage in a beast mode and add that to the tooltip1 field in analyzer.
1 -
First, I don't think that's an overlay bar, because there's no option label totals in an overlay bar.
But if you were using an overlay bar, MichelleH is right that the best approach would be a BeastMode and a tooltip. It's an unusual percentage to get, but I think if you're using an overlay, I agree, it's what you want. Here's a BeastMode that gives the total for Blue and then Green/Blue for not Blue. Since we're mixing whole numbers and percents, I did the formatting in the BM, too:
Graphed as an overlay:
Please π‘/π/π/π this post if you read it and found it helpful.
Please accept the answer if it solved your problem.
2 -
If green is a subset of blue, I think the overlay bar is the appropriate graph. The advantage of the overlay is that even without figuring out the percent that you want, the raw values will be correct, so hovering and tips will work out of the box.
The default calculation for percent_of_category isn't necessarily wrong, it just isn't what you want for your situation. There isn't a way to tell Domo that your series is hierarchical, so it's assuming you want to add up the different groups in your series to comprise the category.
When aggregating the values for green, you can't really directly access the values for blue, since they are held on different rows than the values for green. What you can do though, is used a fixed function to find the total for the category (blue+green) and then subtract out the green values. That's what my beastmode is doing above:
sum(`Value`) / β find the numerator (total of greens)
(
sum(`Value`) fixed(by `Category` ) β this is the same denominator as percent_of_category (blue+green)
-sum(`Value`) βsubtract out the greens
) βa denominator of blues
Please π‘/π/π/π this post if you read it and found it helpful.
Please accept the answer if it solved your problem.
1
Answers
-
@Data_Devon I'd suggest using a tooltip for your data label instead of the default macros. Then you can create the percentage in a beast mode and add that to the tooltip1 field in analyzer.
1 -
First, I don't think that's an overlay bar, because there's no option label totals in an overlay bar.
But if you were using an overlay bar, MichelleH is right that the best approach would be a BeastMode and a tooltip. It's an unusual percentage to get, but I think if you're using an overlay, I agree, it's what you want. Here's a BeastMode that gives the total for Blue and then Green/Blue for not Blue. Since we're mixing whole numbers and percents, I did the formatting in the BM, too:
Graphed as an overlay:
Please π‘/π/π/π this post if you read it and found it helpful.
Please accept the answer if it solved your problem.
2 -
Crap, you are right. I shared the wrong screenshot but I did confirm the actual graph is an overlay.
Perhaps I need a different graph altogether? The Green represents a subset of Blue, so the default calculations are faulty because they end up counting green twiceβ¦
I'll look at Tooltips and I'll explore a different chart type.
0 -
If green is a subset of blue, I think the overlay bar is the appropriate graph. The advantage of the overlay is that even without figuring out the percent that you want, the raw values will be correct, so hovering and tips will work out of the box.
The default calculation for percent_of_category isn't necessarily wrong, it just isn't what you want for your situation. There isn't a way to tell Domo that your series is hierarchical, so it's assuming you want to add up the different groups in your series to comprise the category.
When aggregating the values for green, you can't really directly access the values for blue, since they are held on different rows than the values for green. What you can do though, is used a fixed function to find the total for the category (blue+green) and then subtract out the green values. That's what my beastmode is doing above:
sum(`Value`) / β find the numerator (total of greens)
(
sum(`Value`) fixed(by `Category` ) β this is the same denominator as percent_of_category (blue+green)
-sum(`Value`) βsubtract out the greens
) βa denominator of blues
Please π‘/π/π/π this post if you read it and found it helpful.
Please accept the answer if it solved your problem.
1
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 292 Workbench
- 4 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 95 SQL DataFlows
- 602 Datasets
- 2.1K Magic ETL
- 3.7K Visualize
- 2.4K Charting
- 695 Beast Mode
- 43 App Studio
- 39 Variables
- 658 Automate
- 170 Apps
- 441 APIs & Domo Developer
- 42 Workflows
- 5 DomoAI
- 32 Predict
- 12 Jupyter Workspaces
- 20 R & Python Tiles
- 386 Distribute
- 111 Domo Everywhere
- 269 Scheduled Reports
- 6 Software Integrations
- 113 Manage
- 110 Governance & Security
- 8 Domo University
- 30 Product Releases
- Community Forums
- 39 Getting Started
- 29 Community Member Introductions
- 98 Community Announcements
- Domo Community Gallery
- 4.8K Archive