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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
thorrrr
Helper I
Helper I

Newbie DAY Function sorry

HI Guys

I have a column A with a short date format. I want to add a custom column to it and use the DAY excel function to return the day of each month.

What is the syntax I have looked here but when I try it nothing works I get errors all the time? Sorry I know it is probably me but trying to get my head round Power BI

1 ACCEPTED SOLUTION
Anonymous
Not applicable

sorry in your case in the "custom column formua:" box:

= each Date.Day([Date])

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi Thorr, 

i notice you would like to apply the Day function in the M language (going into editing the query).  

I have a column named, "ShortDate" containing the short dates.  and I have simply added a new "custom column" from the add column tab.  and then applied the formula:  = Table.AddColumn(#"Removed Columns", "Custom", each Date.Day([ShortDate]))

 

The above worked.  I noticed that the formula is case sensitive.

I hope this helps.

Hi

 

Does not work for me I get a new column called Custom with Table in every entry 

 

 

 

 

nowork.jpg

v-caliao-msft
Microsoft Employee
Microsoft Employee

Hi @thorrrr,

 

We can use DAY function to return the day without any issues.
https://msdn.microsoft.com/en-us/library/ee634390.aspx

Capture.PNG

 

Regards,

Charlie Liao

Just get an error if i use your solution 

Anonymous
Not applicable

Hi Thorrr, 

try the following = each Date.Day([ShortDate]) mynewcolumn.JPG

 

i think i can see where you made the mistake.

 

Anonymous
Not applicable

sorry in your case in the "custom column formua:" box:

= each Date.Day([Date])

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.