cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
odalistt Frequent Visitor
Frequent Visitor

Get the last month of dynamic years.

Good day everybody!

 

 

I am working on a project to show the total sales per year.
For this, I have a slicer with the years: 2016, 2017 and 2018.
When I select one, I must show the last month registered in each one, for example in 2016 (September), 2017 (December) and 2018 (October).

 

Which formula can I use to detect the last month for each year?
So far I could only do it for 2018, using the following formula:

ThisMonth = IF ([Date] = MAX ([Date]), "Y", "N")

But when I select 2016 or 2017 in the slicer, my sales table goes blank.

 

 

Thanks for your contributions.

1 REPLY 1
Highlighted
Community Support Team
Community Support Team

Re: Get the last month of dynamic years.

Hi @odalistt,

 

If it is convenient, could you share some data sample and your desired output so that we could help further on it?

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.