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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Problem in generate dCalendar

I try generate my dCalendar but when a using the function List.Dates a had this error.

I having usind brazilian format date. Can help me?

 

Capturar.PNG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

It might be better to build your date table using DAX instead. There are several ways to do so and the code below should work for you. It dynamically builds a date table from dates in your fact table. 

 

You can adjust the code to remove or add additonal columns as needed.

 

Thanks 

 

Date =
VAR Dates =
CALENDAR (
DATE ( YEAR ( MIN ( 'Fact Table'[Date] ) ), 1, 1 ),
DATE ( YEAR ( MAX ( 'Fact Table'[Date] ) ), 12, 31 )
)
RETURN
ADDCOLUMNS (
Dates,
"Year", YEAR ( [Date] ),
"Quarter", FORMAT ( [Date], "q" ),
"Month", MONTH ( [Date] ),
"Month_Name", FORMAT ( [Date], "mmmm" ),
"Month_Short_Name", FORMAT ( [Date], "mmm" ),
"Year_Quarter", YEAR ( [Date] ) & "-Q"
& FORMAT ( [Date], "q" )
)

View solution in original post

3 REPLIES 3
v-easonf-msft
Community Support
Community Support

Hi, @Anonymous Could you please tell me whether your problem has been solved?
If it is,  please mark the helpful replies or add your reply as Answered to close this thread.

Best Regards,
Community Support Team _ Eason

v-easonf-msft
Community Support
Community Support

Hi , @Anonymous 

If the imported date format does not meet your requirements, you can try the following operations to change type with locate:

Right click the date column ->click "Change Type"->click"Using Locate"

4.png

5.png

 

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

Anonymous
Not applicable

It might be better to build your date table using DAX instead. There are several ways to do so and the code below should work for you. It dynamically builds a date table from dates in your fact table. 

 

You can adjust the code to remove or add additonal columns as needed.

 

Thanks 

 

Date =
VAR Dates =
CALENDAR (
DATE ( YEAR ( MIN ( 'Fact Table'[Date] ) ), 1, 1 ),
DATE ( YEAR ( MAX ( 'Fact Table'[Date] ) ), 12, 31 )
)
RETURN
ADDCOLUMNS (
Dates,
"Year", YEAR ( [Date] ),
"Quarter", FORMAT ( [Date], "q" ),
"Month", MONTH ( [Date] ),
"Month_Name", FORMAT ( [Date], "mmmm" ),
"Month_Short_Name", FORMAT ( [Date], "mmm" ),
"Year_Quarter", YEAR ( [Date] ) & "-Q"
& FORMAT ( [Date], "q" )
)

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors