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,333 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
0 answers
0 votes
0 answers
+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
• 1,200 points
284 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
• 11,230 points
37 views
0 votes
0 answers

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

How can I expose a custom query ...READ MORE

1 day ago in Power BI by Evanjalin
• 9,780 points
17 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,621 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?

Power BI loading a CSV file containing ...READ MORE

answered Nov 11, 2024 in Power BI by pooja
• 11,230 points
90 views
0 votes
1 answer

How can you hide a column in Power BI while using a live connection?

While you work in Power BI using ...READ MORE

answered Dec 17, 2024 in Power BI by pooja
• 11,230 points
53 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,718 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 37,515 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