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
Anonymous
Not applicable

New column with data from another column - 1 day

Hi

 

I have a table like this:

 

table1.PNG


As you can see first column is date column and second is just data, I need to make a third column that it would show previous day data from second column.


In example the last 3 rows in that table should look like this:

table2.PNG

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Create a new column like

 

new column =
var _max = maxx(filter(table, [Date] < earlier([Date])),[Date])
return
maxx(filter(table, [Date] = _max),[Data]) //Data is the second column

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Create a new column like

 

new column =
var _max = maxx(filter(table, [Date] < earlier([Date])),[Date])
return
maxx(filter(table, [Date] = _max),[Data]) //Data is the second column

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.