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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
gauravnarchal
Post Prodigy
Post Prodigy

Show upcoming birthdays

Hello,

 

I have a problem finding employees' upcoming birthdays. 

 

I need to create DAX as below:

  1. How can I convert the date column to the DD-MMM format only?
  2. How can I sort the date with date and month only (without year) in visual? Only sort with date & month as I don't have the exact year of birth of each employee so I have updated the year as 21.
  3. Birthdays in 10 days  (I need to find birthdays from today to today+10 days)
  4. Birthdays in 11-20 days  (I need to find birthdays from today to between 11-20 days)
  5. Birthdays in 1 month (I need to find anniversaries from today to today+30 days)
  6. Birthdays in 3 months (I need to find anniversaries from today to today+90 days)

 

I have attached the sample PBIX here. Click here

 

Thanks

4 REPLIES 4
bsheffer
Continued Contributor
Continued Contributor

https://drive.google.com/file/d/1t5jhv97NZzEiAhhiizrqnVqUcDExkZXW/view?usp=share_link

 

try this version. 

I created a table of unique values but created a value for month and day that could be sorted (dob2). 

I sorted the primary dob value by dob2 in the new table. 

set a relationship between the two tables on dob. 

replaced the dob from customer in the visual with the dob from the new table.

sorted the visual on dob.

bsheffer_0-1677696654780.png

 

Padycosmos
Solution Sage
Solution Sage

Hope this helps qith Q1.

Padycosmos_0-1677691069703.png

 

bsheffer
Continued Contributor
Continued Contributor

if you create a second table with two columns (dd-mm & mm-dd),  set a relationship between that and your name table where the dd-mm column resides.  Then you can sort the dd-mm column in the name table by the mm-dd column in the new table.  Do this in the calculated field editor.

 

@bsheffer - I tried doing it but it didn't work.

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.