Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
odalistt
Regular 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
v-piga-msft
Resident Rockstar
Resident Rockstar

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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.