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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
AlanP514
Helper V
Helper V

Dynamic for Finding next Work anniversary datess

AlanP514_0-1649652477250.png
Hai Guys, I want to return the next 3 month's work anniversary celebrants, I Got them but there is one escalation ie this is giving the next 3 months' data, it is not returning the current month's anniversary celebrant's data, for example, today I have one person to celebrate the anniversary but after implementing this measure this is not returning that particular person data. but it is returning next 3 months celebrant's, please help me

 

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

I would create a new column

Next anniversary =
var joinDate = 'Table'[Join date]
var currentYearAnniversary = DATE( YEAR(TODAY()), MONTH(joinDate), DAY(joinDate))
return IF( currentYearAnniversary < TODAY(), 
   DATE( YEAR(TODAY()) + 1, MONTH(joinDate), DAY(joinDate)),
   currentYearAnniversary
)

You could then use relatative date filtering on your table visual but that might not fit with your use case. You could create a measure to use as a filter. If you wanted to show anniversaries in the current month and 3 months after you could use

Show anniversary =
IF( SELECTEDVALUE( 'Table'[Next anniversary]) <= EOMONTH(TODAY(),4), 1, 0)

View solution in original post

5 REPLIES 5
johnt75
Super User
Super User

I would create a new column

Next anniversary =
var joinDate = 'Table'[Join date]
var currentYearAnniversary = DATE( YEAR(TODAY()), MONTH(joinDate), DAY(joinDate))
return IF( currentYearAnniversary < TODAY(), 
   DATE( YEAR(TODAY()) + 1, MONTH(joinDate), DAY(joinDate)),
   currentYearAnniversary
)

You could then use relatative date filtering on your table visual but that might not fit with your use case. You could create a measure to use as a filter. If you wanted to show anniversaries in the current month and 3 months after you could use

Show anniversary =
IF( SELECTEDVALUE( 'Table'[Next anniversary]) <= EOMONTH(TODAY(),4), 1, 0)
v-yangliu-msft
Community Support
Community Support

Hi  @AlanP514 ,

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

If it is convenient, you can express the expected results in the form of pictures, we can better help you.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

AlanP514_0-1649928144280.png

There is a joining date in the table. but expecting the anniversary date 

amitchandak
Super User
Super User

@AlanP514 , if need a column

new date = var _d = [date of joining]

return

date(year(_d), Month(_d)+3, day(_d) )

 

 

measure

new date = var _d = max(Table[date of joining])

return

date(year(_d), Month(_d)+3, day(_d) )

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Nop , This is not the one

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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