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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
poko
Resolver I
Resolver I

highest (Closed) date to the end of the selected year

Hello champs,

 

I need the closest date to end of the selected year for in {EventDate] in following formulas 

VAR SelectedYear = SELECTEDVALUE('Calendar'[Date].[Year])
 
YEAR(CecCaseEvent[EventDate]) = SelectedYear
 
What id does at the moment just selecting a random date in the year in order
CecCaseEvent[EventOrder], DESC
Not sure if that is the closed one to the end of the selected year, that's what I think.
Can you help me how to correct it? 
5 REPLIES 5
ryan_mayu
Super User
Super User

could you pls proivde some sample data and expected output?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hello, Ryan

 

Here I have a picture

poko_0-1739956815860.png

I need selected one, in blue ,that's the closed one to the of the year for 2023. OrderID = EventOrder and [EventDate] = Event Date, selected year is 2023

still not understand your request. Where is the eventorder info? what do you mean eventdate= event date?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hello , I don't know to better explain but I believe it with the MAX formula..

I think I got it this works.

VAR SelectedYear = SELECTEDVALUE('Calendar'[Year])
RETURN
CALCULATE(
MAX(CecCaseEvent[EventDate]),
YEAR(CecCaseEvent[EventDate]) = SelectedYear
)

I tried to describe(related columns) on the picture, sorry for confusion.

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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