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! Learn more

Reply
sunnight
Regular Visitor

Adding date to a table in order to make time based comparisons

Hi,

 

I have a table where I have a column called Order_Creation_Date. What I do not have is a standard Date column.

 

What I want to achieve is create a line chart where I can compare the current day with yesterday, current week with the past week or the current month with the past month with the use of  Order_Creation_Date (of course I will connect it with product_id in order to have a count of products that were created on the same day).

 

What would be the best way to achieve that? 

 

PS. There could be days where there was no orders, so there was no Order Creation Date as well, but still then I want to summarize the orders from the whole day/week/month and be able to compare them in time on a line chart

1 REPLY 1
PaulDBrown
Community Champion
Community Champion

@sunnight 

It is always recommended to create a calendar table to use in slicers, filters and measures. You can create a new table (option in the ribbon) and use the CALENDARAUTO or CALENDAR functions. Either will generate a new table with consecutive dates. You can then add MONTH, YEAR etc columns to this table. Link the new Calendar table to the data table using the date in the Calendar table and your Order_Creation_Date as a single-to-many relatiosnhip.

you can then use this Calendar table to filter in measures, time-intelligence, slicer etc...





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






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