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
santoshrnath
Helper I
Helper I

Power BI Desktop - Day Name Issue

Hello I used the Day function in Power BI desktop to know the day name.

 

Format (DAY(Date), "dddd")

 

But the day shown in wrong. 03rd Feb 2017 is Friday, but it is showing Tuesday. Why is this happening?

 

 

Wrong day.JPG

1 ACCEPTED SOLUTION
MarcelBeug
Community Champion
Community Champion

Well. I'm not a DAX-expert, but DAY(date) gives you 3 (for February 3), and the datevalue of 3 in Power BI is Tuesday, January 2, 1900.

 

I guess you should remove the DAY() part from your formula, so it will read something like =FORMAT([Date], "dddd")

Specializing in Power Query Formula Language (M)

View solution in original post

5 REPLIES 5
MarcelBeug
Community Champion
Community Champion

Well. I'm not a DAX-expert, but DAY(date) gives you 3 (for February 3), and the datevalue of 3 in Power BI is Tuesday, January 2, 1900.

 

I guess you should remove the DAY() part from your formula, so it will read something like =FORMAT([Date], "dddd")

Specializing in Power Query Formula Language (M)

Here's the reason the accept answer works: DAY() returns the day of the month as an integer between 1 and 31. WEEKDAY() is what was the original poster was looking for, returning a day of the week as an integer between 1 and 7 (Sunday through Saturday). FORMAT() can extract information directly from a date value, which is why neither of the other two functions were needed.

Thank you. It resolved the issue.

Phil_Seamark
Employee
Employee

Could be something to do with the column you relate to your DAY table?

 

The formula you are using is ok.

 

I'm guessing the image you have posted is not from your DAY table but another table.  Can you confirm how this table relates to your DAY table, and how do you build your DAY table?


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Hi Phil,

 

I am not using DAY table, There is a date column in the same table call att_date.

 

I am using the formula FORMAT(DAY(att_date),"dddd") to get the day value.

 

I have only one table in the power Bi called att.

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.