cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lyhis
Helper IV
Helper IV

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 IV
Super User IV

@Lyhis , 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



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

1 REPLY 1
amitchandak
Super User IV
Super User IV

@Lyhis , 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



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

March Update

Check it Out!

Click here to read more about the March 2021 Updates!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

secondImage

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.