Stacked Bar with Positive and Negative Results

I've done this previously in Excel, trying to think about how I might do this in Domo, but it just isn't coming to me.  What I'd like to show is this...


Stacked Bar Above and Below Zero


For a given X-Axis date value which represents a transactional vintage, I'd like to show how many are still active (positive) and how many have cancelled (negative).  The total of the over 0 and under 0 would represent the total original population, but over time each "column" would shift lower as active transactions reach a termination state (think of it like a pile driver hammering a pier into the ground).


So if I had business originated in each of 4 successive years, my X-Axis would show 2013, 2014, 2015, 2016.  Business growth was experienced over that time so the gross count of transactions increases year-to-year.  But also as a vintage ages, more of it terminates.  So 2013 might have a very short positive value, and a similar negative (below 0) value.  Each year would similarly display, but less-and-less would reflect below 0 since it has to age before cancelling, and each year would show more-and-more above zero if only because there was year-over-year volume growth which is not yet offset by cancellation of aged transactions.


I could do this as a "greater than 0" stacked bar by establishing a series for Active versus Cancelled and each transaction represents '1' (or whatever metric).  What I cannot conceptualize in Domo is how to have some values that are '1', and some that represent '-1', without Domo trying to net those results.  I want 100 and -100 to equal 100 above 0 and 100 below zero, not NET Zero.  

Best Answers

  • Godzilla
    Godzilla 🟢
    Accepted Answer

    I've done this many times. You will have to keep your Active counts and Cancel counts as separate columns in your dataset in order for Domo not to net the results. Like you mentioned, the Actives will have to be positive and the Cancels negative.


    I've also added a Net line in some cases by just creating a beast mode field and adding the two columns(incase you want to do this later). 



  • Godzilla
    Godzilla 🟢
    Accepted Answer

    You should be able to do it as stacked bar as well, without any horizontal offset. You would do something like this:





  • Oooohhhh... so there will be a horizontal offset between the two columns.  Not Stacked which is how I was thinking about it, but rather done as a Grouped Column, one will go up, the other down, and they'll share an X-Axis value.  Got it!  Not exactly the visual I was going for, but I can see how to do it now, and an opportunity for an Ideas Exchange contribution.  Smiley Wink


    Thanks, @Godzilla!


    @DaniBoy, I wanna be purple when I grow up!

  • Thank you, that view helps.  I was locking myself into thinking about "Series" with No Aggregation.  But instead, having two separate measures to represent the Series components, and no Dimensional Series value, totally makes sense.


    Thank you (again!)

  • If I am getting both Installs and Uninstalls as positive numbers, can I not just use Beast Mode to create a new field for Uninstalls by taking that original column and multiplying by -1?


    I am trying to get this to work to no avail.  When I go to source files and multiply the field manually and then build the chart, works perfectly, but trying my validated beast Mode field (Uninstalls * -1) looks like it's still being applied as positive number.


    Both charts are correctly applying a BM calculated field for Net Installs


    Also, side question: can I swap the two Y Axis labels/scales



This discussion has been closed.