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
icturion
Resolver II
Resolver II

DAX date table

Hello,

 

i'm trying to create a date table based on the date value of a column within a different table.

 

This is what a got so far:

Date =
ADDCOLUMNS (
CALENDAR (DATE(2010;1;1); DATE(2025;12;31));
"DateAsInteger"; FORMAT ( [Date]; "YYYYMMDD" );
"Jaar"; YEAR ( [Date] );
"Maand nr"; FORMAT ( [Date]; "MM" );
"JaarMnd nr"; FORMAT ( [Date]; "YYYY/MM" );
"JaarMnd kort"; FORMAT ( [Date]; "YYYY/mmm" );
"Maand kort"; FORMAT ( [Date]; "mmm" );
"Maand lang"; FORMAT ( [Date]; "mmmm" );
"Dag van de week nr"; WEEKDAY ( [Date] );
"Dag van de week"; FORMAT ( [Date]; "dddd" );
"Dag van de week kort"; FORMAT ( [Date]; "ddd" );
"Kwartaal"; "Q" & FORMAT ( [Date]; "Q" );
"JaarKwartaal"; FORMAT ( [Date]; "YYYY" ) & "/Q" & FORMAT ( [Date]; "Q" )
)
 
Regards
ICTURION
4 REPLIES 4
icturion
Resolver II
Resolver II

Using this DAX i can create a table with one column based on the values in the other table/column:

 

Datum = CALENDAR(MIN('Sales'[OrderDate]);MAX('Sales'[OrderDate]))
 
next step is to maken one DAX solution.

Hi @icturion 

You may also use CALENDARAUTO Function.If you have other question,please share more details for us so that we could help further on it.If not,please accept the reply as solution to close this thread.

Regards,

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

Hi @icturion 

Could you tell me if your problem has been solved? If it is,kindly mark the helpful answer as a solution and welcome to share your own solution. More people will benefit from here. If not, please share more details for us so that we could help further on it.You can upload the .pbix file to OneDrive and post the link here. Do mask sensitive data before uploading.

Regards,

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

Hi,

The problem still exists. I am currently working around it by building the calendar table per calculated column. what i'm actually looking for is one dax code that is derived from a date column in another table.

 

regards 

icturion

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.