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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Jay2022
Helper IV
Helper IV

adding an order column to a calculated table

I have created a table with dates i want to add a column which orders these dates numerically, 1,2,3 and so on. 

 

Any help greatly appreciated 

 

Thanks 

1 ACCEPTED SOLUTION
mark_endicott
Super User
Super User

@Jay2022 - Here's an easy way to do this as a calculated table:

 

Dates = 

VAR _dates = CALENDARAUTO( )

RETURN 
    ADDCOLUMNS( _dates, "Day", DAY( [Date] ))

 

mark_endicott_0-1730997533063.png

 

If this works for you, please accept is as the solution to help with visibility for others with the same issue. 

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Jay2022 , hello mark_endicott  and lbendlin, thank you for your prompt reply!

Is there any progress on this issue?

 

If you find anyone's answer is helpful to you, please remember to accept it.

 

It will help others who meet the similar question in this forum.

 

If you have any further related issues, please feel free to reply!

mark_endicott
Super User
Super User

@Jay2022 - Here's an easy way to do this as a calculated table:

 

Dates = 

VAR _dates = CALENDARAUTO( )

RETURN 
    ADDCOLUMNS( _dates, "Day", DAY( [Date] ))

 

mark_endicott_0-1730997533063.png

 

If this works for you, please accept is as the solution to help with visibility for others with the same issue. 

 

lbendlin
Super User
Super User

What for? The dates are already usable for sorting?

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

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.