Total for stacked columns


#1

Hi.

Is there a way to get a Total/Sum for a stacked column?

Thank you.


#2

Hello, Jaitsujin!
That is possible, but quite tricky to do. What you need to do, is iterate through each item you have, check its Status - Completed or Processing, then add its value to a variable TotalCompleted, let’s say. I would also recommend to create an additional property in each item called Total and give it an empty value ‘’.

Then, when you reach final item for the status Completed, in this case the one that has “11. November” value, also add Total property to it, but make it equal TotalCompleted. Then you can use this instruction to add notes based on Total property, which will only appear for the last element as it is not empty. You can also change position to right, instead of bottom and it will appear just where you want it to.

If this sounds too complex, we can spend some of our time and do it for you, but you’ll need to purchase 60 support minutes from our store - https://plumsail.com/sharepoint-dashboard-designer/store/


#3

Hi. I believe I purchased Support Minutes. Is there anyway to check?


#4

Hello, jaitsujin!
Please, send us your email you’ve used during purchase to [email protected] with topic “Dashboard Designer - Total for Stacked columns” and you can also include link to this topic. We will check if purchase was made with that email and if it was, we’ll write a solution for you and send it back to you.


#5

Hi,

I’ve got a step closer, but something does not work the way it supposed to. What am I missing?

It looks perfectly fine when I preview in Edit mode, but once saved and exit the tooltip won’t appear anymore.
Console says ‘data’ is undefined.

Error2

Where can I define that?


#6

Hello, jaitsujin!
Yes, that error often appears when you try to use data in Dashboard section, but it can be easily fixed.
I would recommend to add this line in Data Source -> Advanced:

handlers.aggregationSuccess = function(data, logger) {
  window.myData = data;
  return true;
}

Then, replace all the references to data in the Dashboard section with window.myData, for example:

window.countTotal = function (value){
  var total = window.myData.items.length;
  return total;
}

This should work.


#7

Nice!

That worked perfectly.

Learning more and more about this awesome tool and loving it!