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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
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

@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' )

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

3 REPLIES 3
parry2k
Super User
Super User

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



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@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' )

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.