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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
clarawang_12
Frequent Visitor

Need help on Dynamic Calendar measures.

Dear all,

 

I have created a measure that shows dynamic calendar, which ranges from first date to last date of certain report.

However errors popped out, can you pls shed a light on this measure? Thanks.

----------------------------------------------

DynamicDate = ADDCOLUMNS(
CALENDAR(FIRSTDATE('TicketList'[Created]),LASTDATE('TicketList'[Created])),
"Year",YEAR([Date]),
"Quarter",ROUNDUP(MONTH([Date])/3,0),
"Month", MONTH([Date]),
"Week",WEEKNUM([Date]),
"Month Year",YEAR([Date]) * 100 + MONTH([Date]),
"WeekDay",WEEKDAY([Date])
)
clarawang_12_0-1680010710451.png

 

 

1 REPLY 1
johnt75
Super User
Super User

Do you have auto date/time enabled? If so I think you would need to use

DynamicDate =
ADDCOLUMNS (
    CALENDAR (
        MIN ( 'TicketList'[Created].[Date] ),
        MAX ( 'TicketList'[Created].[Date] )
    ),
    "Year", YEAR ( [Date] ),
    "Quarter", ROUNDUP ( MONTH ( [Date] ) / 3, 0 ),
    "Month", MONTH ( [Date] ),
    "Week", WEEKNUM ( [Date] ),
    "Month Year",
        YEAR ( [Date] ) * 100
            + MONTH ( [Date] ),
    "WeekDay", WEEKDAY ( [Date] )
)

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.