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
DynamicsHS
Helper II
Helper II

How to filter a date based on Day/Month and not year for birthdays?

Hi, 

 

I am trying to create a table that shows peoples birthday based whether their birthday is today. I am pulling the information from dataverse and have a table with peoples birthdays that shows dd/mm/yyyy. When I go to filter it from accending to decending is bases that filter on the year. I changed the format of the column to dd/MM and tried to filter it again by accending to decending and it still filtered based on the year. 

 

How would I extract the day and month from the date (dd/mm/yyyy) so that I could have a table that filters based on the day and month of someones birthday and not show their year? 

 

and then be able to create the table so that peoples birthdays only show if their birthday is today.

 

e.g. example of the data 

DynamicsHS_0-1652315958750.png

 

Regards,

HS

 

 

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Write this calculated column formula

=format(Data[cdm_birthdate],"mmyy")


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Write this calculated column formula

=format(Data[cdm_birthdate],"mmyy")


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
mahoneypat
Employee
Employee

In the query editor, make sure you convert your column to type Date (not DateTime), and then create a custom column with this expression to keep just the month and year. You could then convert that column to text or integer.

 

= Date.ToText([DateColumn], "MMdd")

 

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Hi Pat, 

 

I change it to date. I then went to create a custom column and the "mmdd" comes up in red.

DynamicsHS_0-1652321649330.png

 

Ehen I press okay it comes up as an error? as says this: 

DynamicsHS_1-1652321696755.png

Any thoughts on how I could rectify this? 

 

Thanks,

HS

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.