7 Replies Latest reply: Jun 22, 2018 10:43 AM by Lucio Gutierrez

# How can i get the year average for the products sold just in the last month?

Hi Experts

I have a simple table with 3 columns

1- Product

=Product

2- Sales average for current month

=Avg({<Month={\$(=max(month))}>}Sales)

3- Sales average for the year

=Avg({<Month=>}Sales)

My problem is when I remove the month, I also see products sold in othe months.

Question:

How can i get the just the year average for the products sold just in the last month?

(extample Attached

prouducts without Avg Jun, are from other months, i need removed them from the table).

Regards.

• ###### Re: How can i get the year average for the products sold just in the last month?

Hi,

Maybe you can do something like this:

=if(Avg({<Month={\$(=max(month))}>}Sales)>0,Avg({<Month=>}Sales))

• ###### Re: How can i get the year average for the products sold just in the last month?

Thank you very much for your feedback...

However it doesn't work...

thanks.

• ###### Re: How can i get the year average for the products sold just in the last month?

You can also use this

=Avg({<Month, Product = {"=Avg({<Month = {\$(=max(month))}>}Sales) <> 0"}>}Sales)

• ###### Re: How can i get the year average for the products sold just in the last month?

Thanks Sunny

however it don't work.

the script don't come back anything.

thaks.

• ###### Re: How can i get the year average for the products sold just in the last month?

Would you be able to share a sample?

• ###### Re: How can i get the year average for the products sold just in the last month?

In the first table, I sow the products for the last month. and in the second I need the total year average for the products, but just for the products in the first table.

the problem is when i add the Acum column with the avg for the year, I get also products for other months.