This tutorial shows how to get the value from previous (or next or something like this...) row in Power Query or Power BI queries.

I mean if you have a table like this:

and need values from previous rows, like this:

How to do it?

First you need the index column:

Then add 1 (if you want to move one row back):

Then merge the table with itself. The key are the original and moved index.

Click on the doublesided arrow at the header and show the original value from connected query.

Remove the indexes and that´s all.

1 Comment

Leave a Reply

Your email address will not be published.


clear formPost comment