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

Changing date to one day per month

Hi guys, 

I have a date table like below: (this is on dd/mm/yyyy format)

thatjoey20_1-1606734170331.png

that has many days in a single month, normal, but is there a way to change this column like to be one day per month? For instance: 

01/01/2019
01/02/2019 
01/03/2019 and so on..

I want this because I have a value column based on month, but it sums the value since I have different days in a month.

 

 

I problaby bring a simple problem, but if any of you can give me a hint or another way to solve it would be very nice

1 ACCEPTED SOLUTION
v-jayw-msft
Community Support
Community Support

Hi @thatjoey20 ,

 

You could create a calendar table and create a relationship between this table and calendar table like below.

 

calendar = CALENDARAUTO()

 

8.PNG

 

Best Regard,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

4 REPLIES 4
Singaravelu_R
Resolver III
Resolver III

Create seperate calendar table by using below DAX and related with date column of your table with calendar table date (one to many relationship)

Date =
ADDCOLUMNS (
CALENDAR (DATE(2000;1;1); DATE(2025;12;31));
"DateAsInteger"; FORMAT ( [Date]; "YYYYMMDD" );
"Year"; YEAR ( [Date] );
"Monthnumber"; FORMAT ( [Date]; "MM" );
"YearMonthnumber"; FORMAT ( [Date]; "YYYY/MM" );
"YearMonthShort"; FORMAT ( [Date]; "YYYY/mmm" );
"MonthNameShort"; FORMAT ( [Date]; "mmm" );
"MonthNameLong"; FORMAT ( [Date]; "mmmm" );
"DayOfWeekNumber"; WEEKDAY ( [Date] );
"DayOfWeek"; FORMAT ( [Date]; "dddd" );
"DayOfWeekShort"; FORMAT ( [Date]; "ddd" );
"Quarter"; "Q" & FORMAT ( [Date]; "Q" );
"YearQuarter"; FORMAT ( [Date]; "YYYY" ) & "/Q" & FORMAT ( [Date]; "Q" )

v-jayw-msft
Community Support
Community Support

Hi @thatjoey20 ,

 

You could create a calendar table and create a relationship between this table and calendar table like below.

 

calendar = CALENDARAUTO()

 

8.PNG

 

Best Regard,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
amitchandak
Super User
Super User

@thatjoey20 , if dd/mm/yyyy has been take as date then it because of system setting and will not change mm/dd/yyyy without setting change https://community.powerbi.com/t5/Desktop/How-to-apply-UK-date-format-dd-mm-yyyy-in-Date-slicer/td-p/...

 

 

You can create new date columns from formats

 

new date(US to Uk) =
var _pos = search("/",[Date],,0)
return
date(right([date],4), left([date],_pos-1), mid([date],_pos+1,2))

new date(UK to US) =
var _pos = search("/",[col],,0)
return
date(right([date],4), mid([date],_pos+1,2), left([date],_pos-1))

 

 

 

the format for me it's okay, we use this format here, the real problem is that I want to take out the many days and set only to be one day per month like 1st may of 2019, 1st june of 2019 , 1st july of 2019

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.