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 9, 2019 in Power BI by Phalguni
• 1,020 points
160 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 9, 2019 by EdurekaUser
• 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, 2019 in Power BI by Cherukuri
• 33,010 points
5,843 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, 2019 in Power BI by Upasana
• 8,620 points
3,509 views
0 votes
1 answer

How to convert a Integer to Text value in Power BI?

Make sure you have the correct format ...READ MORE

answered Dec 8, 2020 in Power BI by Gitika
• 65,970 points
3,018 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, 2019 in Power BI by EdurekaUser
• 1,500 points
185 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, 2019 in Power BI by EdurekaUser
• 1,500 points
1,630 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 3, 2019 in Power BI by EdurekaUser
• 1,500 points
1,235 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, 2019 in Power BI by anonymous
132 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, 2019 in Power BI by EdurekaUser
• 1,500 points

edited May 17, 2019 by Omkar 5,186 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 9, 2019 in Power BI by EdurekaUser
• 1,500 points

edited Mar 9, 2019 by EdurekaUser 839 views