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?
β Did this solve your problem? Accept it as a solution!
β€οΈDid you love this answer? Mark it as "Awesome"!
πDo you agree with this process? Click "Agree"!
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.
β Did this solve your problem? Accept it as a solution!
β€οΈDid you love this answer? Mark it as "Awesome"!
πDo you agree with this process? Click "Agree"!
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.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