Aggregate/summary table that tracks sales trends

I would like to create a aggregate/summary table that shows sales trend between months… Account | Prior Month Sales | Current Month Sales | % Change This may not be possible…I wanted to check…thanks

Hi rocketc, can you explain a little bit more what you’re looking for? How are you tracking Sales right now? Just on the Opportunity object? do you have prior month sales and current month sales as fields in that object right now? This kind of determines how you would do this / how easy it would be.

For example, here’s a sample aggregation I made comparing Last Month’s Won Opportunities by Account vs. the Current Month’s. But to show the percentage change out of the box, it would seem like you need Prior Month Sales, Current Month Sales & % Change to be fields on the object. Does this clarify things at all for you?

Anna, Thank you for your help. I have a custom object called Orders…In this object I have several fields including: [Order Date] & [Total Sale]. The Account object has a Master-Detail relationship with the Order_c object. I only have the [Total Sale] field.

Okay, so “Total Sale” is the total amount for that order?

Thanks for the clarification. It does sound like what you’re trying to do is not possible out of the box, since you are trying to not just aggregate/summarize data, but also summarize/manipulate those aggregations. It could work if you add some formula fields (or maybe some custom Javascript… but my default is “everything is possible with Javascript.” I’d try the formula fields first if I were you.) e.g. on Account it may be possible to create a roll up summary of Orders last month, one for the current month and then a formula calculating the percent difference. — On the Skuid end, I’m including the xml for the page I made if you want to go in and look at it. The way it works is it takes the Closed Won Opportunities (for you this could just be Orders) and then calculates the some of last month’s orders grouped by the account lookup field. then, I actually have another model exactly the same but with a condition where date = this month that powers the second table. If you’ve installed Skuid, you can copy and paste this page into your own org (using the view/edit XML page at the bottom of the Skuid page builder.) I think you could do something similar with your Orders object - have conditions or filters on Date, and then summaries of Total Sale and group it by Account Name. Also here is some more information about aggregations in Skuid.

that page: Last Month Sales

sum avg Current Month Sales sum avg

Yes, that is correct. I understand your suggestion in having a fields called Last Month, Current Month and percent change…not sure how to do this on the Orders object…but…I guess I could create rollup fields on the Account object…for Past month and Current Month and use a formula field to calculate the percent change…I wanted to check and see if I could use Skuid to creatively accomplish this…I have many similar calculations I would like to create…and I wanted to limit the number of roll-up fields I create…thank you again and please let me know if you can think of any creative ways to accomplish using skuid.

Thank you, I will let you know if I think of anything. also let us know if you have any creative ideas of your own. :slight_smile:

Anna, would it be possible to create two Aggregate/Summary models— -Sum Sales for Current Month -Sum Sales for Prior Month And then Create a third model that “grabs” the data from the above models – calculates the % difference and inserts results into a custom template…Note: I have no idea what I’m talking about…it just sound good.

Haha welcome to my life! Yes - Sum Sales Current Month & Sum Sales Prior Month (that’s basically my idea with the two models on my page). you could also have just one model summing all sales and a filter that you can select to show “just last month” or “just this month” etc. No - third model doing calculations. we do have a template component in Skuid, but it just lets you include html and multiple fields / custom text… no calculations :frowning: I am not sure if there is any way to do this in Javascript. [you can include inline javascript in the resources tab that will be included in your Skuid page]