Forum Discussion

icturion's avatar
icturion
Resolver II
7 years ago

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

  • 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.
    • v-cherch-msft's avatar
      v-cherch-msft
      Microsoft Employee

      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,

      • v-cherch-msft's avatar
        v-cherch-msft
        Microsoft Employee

        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,