Why does a reference to a value in previous row throw this Expression.Error?

0 votes

I am trying to perform an operation in Excel using Powerquery. as well as Power BI

I want to remove contacts in a list if they are connected to a certain CompanyID but are listed with a different CompanyName.

The fist step is to filter them out by comparing to the row above. They are always listed consecutively.

Next step is to remove all rows containing the value delete in the delete column but unfortunately I do not get to that step.

I get this error:

There were too many elements in the enumeration to complete the operation
May 8 in Power BI by Phalguni
• 1,010 points
34 views

1 answer to this question.

0 votes
If you have multiple steps after the #"Added Index" that might change your data.

The current step will refer to the data as it appears in the #"Added Index" step.

Any changes that are performed after the #"Added index" step will not be available to the statement.

You may want to adjust your posted step to use the latest representation of your data instead of #"Added index".

If #"Added index" is the most recent step in your M code, the statement runs fine, so the problem is that the data is changed in the steps in between.

Adjust the statement to refer to the most recent data step instead of #"Added index".
answered May 8 by Avantika
• 1,500 points

Related Questions In Power BI

0 votes
1 answer

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

Hi Sindhu, add this line as your ...READ MORE

answered Mar 18 in Power BI by Cherukuri
• 31,840 points
1,068 views
0 votes
1 answer

To expand all lists in a row of lists at the same time without recurring values

Can't promise simple, but I have something ...READ MORE

answered Feb 19 in Power BI by Upasana
• 8,550 points
322 views
0 votes
1 answer

Is there a way to convert JSON data to readable table in power bi

Follow these steps step 1 - Click on ...READ MORE

answered Sep 24, 2018 in Power BI by Hannah
• 16,630 points
2,913 views
0 votes
1 answer

What are the components I need to excel to become a pro in power BI

Having knowledge about these topics is a must.  Power ...READ MORE

answered Oct 8, 2018 in Power BI by Kalgi
• 42,510 points
64 views
0 votes
1 answer

How do you use R visuals in Power BI Desktop?

Hi, In order to use R Visuals you ...READ MORE

answered Apr 10 in Power BI by Avantika
• 1,500 points
42 views
0 votes
1 answer

How do I use Python scripts in Power BI?

Hi, You can create interactive reports out of ...READ MORE

answered May 2 in Power BI by Avantika
• 1,500 points
263 views
0 votes
1 answer

How To use R Integration in Power BI?

Hi,  There are a lot of packages available ...READ MORE

answered May 2 in Power BI by Avantika
• 1,500 points
177 views
0 votes
0 answers

How do you change the tables in chart filters?

I am working on a report that shows ...READ MORE

May 10 in Power BI by anonymous
30 views
0 votes
1 answer

How to sum a data table in Power BI?

It's a good practice if you avoid ...READ MORE

answered May 17 in Power BI by Avantika
• 1,500 points

edited May 17 by Omkar 97 views
0 votes
1 answer

How do you create a link visual in Power BI?

You can easily create a link between ...READ MORE

answered Mar 8 in Power BI by Avantika
• 1,500 points

edited Mar 9 by Avantika 83 views