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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Justas4478
Post Prodigy
Post Prodigy

Controlling years on source table date

Hi I have this Query:
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjbQNzDWNzIwNFWKjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Start Date" = _t]),


#"Changed Type" = Table.TransformColumnTypes(Source,{{"Start Date", type date}}),


Custom1 = Table.AddColumn(#"Changed Type", "Second Column", each Date.AddYears([Start Date],1))

 

I am trying to incorporate this part "Date.AddYears([Start Date],1)" from 'Custom1' query in to 'Source' query.
However I don't really really know M language so I cant tell well what is happening in 'Source' query.
Anyone know how to do these changes or they cant be done at this step of the query?

Thanks

2 REPLIES 2
Anonymous
Not applicable

Try:


Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjbQNzDWNzIwNFWKjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Start Date" = #"custom1"[Second Column]),

 

--Nate

Hi, @Anonymous I am getting cycle reference error.

Sorry for misunderstanding instead of trying to incorporate column what I needed was only Date.AddYears function.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.