How can I get a column value from previous row in Power Query

0 votes

How can I get a column value from previous row in Power Query?

Mar 18, 2019 in Power BI by Sindhu
8,520 views

1 answer to this question.

0 votes
Hi Sindhu, add this line as your measure code, then add the column into your table.

Name = Table.AddColumn(#"Added index", "custom column", each #"Added index"{[Index]-1}[My Column]).

For more information see this,

https://social.technet.microsoft.com/Forums/en-US/5577b086-1d84-4b7e-9bed-59f15b01a8b0/how-can-i-do-calculation-based-on-nextprior-row-in-power-query?forum=powerquery
answered Mar 18, 2019 by Cherukuri
• 33,030 points

Related Questions In Power BI

0 votes
1 answer
0 votes
1 answer

How can I retrieve a mapped value from a many-to-one related table in Power BI when using DirectQuery mode?

Get the associated values per multiple linked ...READ MORE

answered Jan 23 in Power BI by pooja
• 16,840 points
63 views
+1 vote
2 answers

How can I count the distinct values in a column using Power BI?

In Power BI, use the DISTINCTCOUNT DAX ...READ MORE

answered Nov 26, 2024 in Power BI by Anu
• 2,840 points
435 views
0 votes
1 answer

How can I preserve table data type columns from Power Query in the Power BI Data Model?

Best practices to guarantee that the defined ...READ MORE

answered Dec 23, 2024 in Power BI by pooja
• 16,840 points
91 views
0 votes
1 answer

How can I expose a custom query as a reusable view in an existing Power BI dashboard?

The steps to make customizable queries towards ...READ MORE

answered Jan 23 in Power BI by pooja
• 16,840 points
81 views
0 votes
1 answer

How do I extract JSON data from an API and transform it into a structured table in Power Query?

To extract and transform JSON data from ...READ MORE

answered 1 day ago in Power BI by anonymous
• 19,330 points
20 views
0 votes
1 answer

In DAX, how do I RETURN the sum of a calculated column from a DAX Table Variable (created via ADDCOLUMN)?

You can access column variables of previously ...READ MORE

answered Oct 8, 2020 in Power BI by Gitika
• 65,770 points
4,726 views
0 votes
1 answer

How can I troubleshoot a scenario where Power BI loads data with wrong formats or encoding from a CSV file?

Troubleshoot Incorrect Formats or Encoding with CSV ...READ MORE

answered Dec 30, 2024 in Power BI by Vani
• 3,440 points

edited Mar 6 166 views
0 votes
1 answer

Calculated column with the sum of values from many columns in a row

Hi, You can create a new column by ...READ MORE

answered Mar 14, 2019 in Power BI by Cherukuri
• 33,030 points
2,799 views
0 votes
1 answer

How to rename a column using DAX in Power BI?

Hi Ramya, I found these two function that ...READ MORE

answered Aug 22, 2019 in Power BI by anonymous
• 33,030 points

edited Dec 31, 2021 by Soumya 38,457 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP