cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Jarodp42
Frequent Visitor

How to add dates to existing data in a table

Hi everyone, I am trying to add the date range 1/1/2019 - 12/31/2019 to my data. Can someone please help me understand how to accomplish this?

 

Example data:

Namevalue
A10
B15
C20

 

I am looking to add a date range for each row on my table like this.

 

NameValueDate
A101/1/2019
A101/2/2019
A101/3/2019
A101/4/2019
A101/5/2019
A101/6/2019
A101/7/2019
A101/8/2019
A101/9/2019
A101/10/2019
A101/11/2019
A101/12/2019
B151/1/2019
B151/2/2019
B151/3/2019
B151/4/2019
B151/5/2019
B151/6/2019
B151/7/2019
B151/8/2019
B151/9/2019
B151/10/2019
B151/11/2019
B151/12/2019
C201/1/2019
C201/2/2019
C201/3/2019
C201/4/2019
C201/5/2019
C201/6/2019
C201/7/2019
C201/8/2019
C201/9/2019
C201/10/2019
C201/11/2019
C201/12/2019

 

Can someone please explain to me how I can accomplish this, as I am fairly new to Power BI and still learning the ins and outs of the system. Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Super User IV
Super User IV

Re: How to add dates to existing data in a table

@Jarodp42 assuming your original table name is Table, go to modelling tab and add following expressoin to create new table and this new table will have what you are looking for

 

New Table = 
VAR __calendar = CALENDAR ( "2019,1,1", "2019,12,31" )
RETURN CROSSJOIN ( __calendar, 'Table' )

 






Did I answer your question? Mark my post as a solution.

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

3 REPLIES 3
Super User IV
Super User IV

Re: How to add dates to existing data in a table

@Jarodp42 so you want full year apply to these 3 rows.






Did I answer your question? Mark my post as a solution.

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Super User IV
Super User IV

Re: How to add dates to existing data in a table

@Jarodp42 assuming your original table name is Table, go to modelling tab and add following expressoin to create new table and this new table will have what you are looking for

 

New Table = 
VAR __calendar = CALENDAR ( "2019,1,1", "2019,12,31" )
RETURN CROSSJOIN ( __calendar, 'Table' )

 






Did I answer your question? Mark my post as a solution.

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

Jarodp42
Frequent Visitor

Re: How to add dates to existing data in a table

@parry2k Yes, that is exactly what I was looking for. Thank you for the help!!!

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors