Percent of Series?

Data_Devon
Data_Devon Contributor

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

  • MichelleH
    MichelleH Coach
    Answer βœ“

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

  • DavidChurchman
    Answer βœ“

    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.

  • DavidChurchman
    Answer βœ“

    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.

Answers

  • MichelleH
    MichelleH Coach
    Answer βœ“

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

  • DavidChurchman
    Answer βœ“

    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.

  • Data_Devon
    Data_Devon Contributor

    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"!

  • DavidChurchman
    Answer βœ“

    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.