Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
PepeMontes
Partner - Contributor III
Partner - Contributor III

Show sales of last 12 months in a table

Hello Deart Experts,
I want to show the last 12 months of sales From today(12-Aug-2019) in a table like this

MonthYearSales
September 2018x
October 2018x
November 2018x
December 2018x
January 2019x
February 2019x
March 2019x
April 2019x
May 2019x
June 2019x
July 2019x

 

I'm using the next set analysis:
(Sum(Sales)/Sum({$< MonthYear= {$(=Month(Date#(Max(MonthYear)-1 'M')))}>} [Sales])) 

But this function just give me the last month and all the other stay null.

If someone can help me it would be great.

Regards.

 

JAMM.

4 Replies
sunny_talwar

Why do you have Sum(Sales)/Sum({<set_analysis>}Sales)? This would essentially give you NA or 1?

PepeMontes
Partner - Contributor III
Partner - Contributor III
Author

Because i want to calculate the next funtion:
Balance/Sales(Last 12 months)

sunny_talwar

Would you be able to provide a sample where we can see the numbers you have and the output you expect to see from it?

PepeMontes
Partner - Contributor III
Partner - Contributor III
Author

In the next image attached you would see that the only month filled it's April, because the set analysis of Date it's this one:
(Sum(Sales)/Sum({$< MonthYear= {$(=Month(Date#(Max(MonthYear)-3, 'M')))}>} [Sales]))

I know my set analysis it's wrong because i just calculating for the max month less 3 in this case April

I would like to have this information filled in the last 12 months, like a shown into the table of my frist comment.


Regards.