<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Expression.Error: There were too many elements in the enumeration to complete the operation. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expression-Error-There-were-too-many-elements-in-the-enumeration/m-p/4875985#M185830</link>
    <description>&lt;P&gt;This error would happen if you have any cases where the same person took the survey multiple times on the same day.&lt;BR /&gt;&lt;BR /&gt;If the pivot works when you switch Don't Aggegate to take a max or a min instead, then I bet that's the problem. If that's the problem, you'll need to decide how you want to aggregate the records.&lt;/P&gt;</description>
    <pubDate>Fri, 14 Nov 2025 22:08:34 GMT</pubDate>
    <dc:creator>AlexisOlson</dc:creator>
    <dc:date>2025-11-14T22:08:34Z</dc:date>
    <item>
      <title>Expression.Error: There were too many elements in the enumeration to complete the operation.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expression-Error-There-were-too-many-elements-in-the-enumeration/m-p/4875951#M185827</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my data, raw:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need it to be in this format:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;(These I manually created, but my data is over 20,000 rows and I can't manually do them all.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In power query, I've tried piveting the question and response row&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;But when I do this, some of the records come of the empty and I get a error&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I googled that error and was advised to add a index column, which I did and repeated the steps.&lt;/P&gt;&lt;P&gt;But when I do that, what should be one record based on one day per email becomes 3 records based on the 3 different questions.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;So all the repsonses from email: acooke on 1/31 should be on 1 line (it's on 3)&lt;/P&gt;&lt;P&gt;All the responses from fwstowel on 1/26 should be on 1 line (it's on 3)&lt;/P&gt;&lt;P&gt;All the responses from mdew on 1/24 should be on 1 line (it's on 3)&lt;/P&gt;&lt;P&gt;All the responses from mdew on 1/26 should be on&amp;nbsp;1 line (it's on 3)&lt;/P&gt;&lt;P&gt;So on and so forth.&lt;/P&gt;&lt;P&gt;It's creating a whole bunch&amp;nbsp; of extra records.&lt;/P&gt;&lt;P&gt;It should all be on one line per email, per date:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Nov 2025 20:58:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expression-Error-There-were-too-many-elements-in-the-enumeration/m-p/4875951#M185827</guid>
      <dc:creator>e175429</dc:creator>
      <dc:date>2025-11-14T20:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: Expression.Error: There were too many elements in the enumeration to complete the operation.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expression-Error-There-were-too-many-elements-in-the-enumeration/m-p/4875985#M185830</link>
      <description>&lt;P&gt;This error would happen if you have any cases where the same person took the survey multiple times on the same day.&lt;BR /&gt;&lt;BR /&gt;If the pivot works when you switch Don't Aggegate to take a max or a min instead, then I bet that's the problem. If that's the problem, you'll need to decide how you want to aggregate the records.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Nov 2025 22:08:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expression-Error-There-were-too-many-elements-in-the-enumeration/m-p/4875985#M185830</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2025-11-14T22:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: Expression.Error: There were too many elements in the enumeration to complete the operation.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expression-Error-There-were-too-many-elements-in-the-enumeration/m-p/4876002#M185832</link>
      <description>&lt;P&gt;It doesn't matter what aggregate function i choose, it does the same thing of triple counting the records.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Nov 2025 22:24:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expression-Error-There-were-too-many-elements-in-the-enumeration/m-p/4876002#M185832</guid>
      <dc:creator>e175429</dc:creator>
      <dc:date>2025-11-14T22:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: Expression.Error: There were too many elements in the enumeration to complete the operation.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expression-Error-There-were-too-many-elements-in-the-enumeration/m-p/4876114#M185835</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="531109" data-lia-user-login="e175429" class="lia-mention lia-mention-user"&gt;e175429&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try approach suggested by&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="39298" data-lia-user-login="AlexisOlson" class="lia-mention lia-mention-user"&gt;AlexisOlson&lt;/a&gt;&amp;nbsp;.If it doesnt work ,share more input/output information in the form of PBIX or sample data.&lt;/P&gt;&lt;P&gt;When you pivot the "Question" column with "Response" as values, Power Query expects each "Question" to appear only once per grouping key. If the same "Question" appears multiple times for the same "Email Address" or "Date", Power Query tries to aggregate them — but if no aggregation function is specified, it throws this error. Below is the power query code i tried and it worked beacuse there were no duplicates.can you also confirm&amp;nbsp; the same?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("rdRNT4QwEAbgvzLhTISy3ydNdK960JgYsodmnQ1NWorTIvDvbXWjZutisvTCoZB5Om+YKcvkTsOgWzggSrAVt6BbAotcAa9Nh4Sv/j2BqN9aQQM0pFVj5XCdpMkLGvdsDRK7wZ6rRuLVXit3xrJikRV5MU92aZk8vCNxKVOodAeGW2EOwtX11T/xTtjqSyE0ja4N+urP6Ljvr49QMR3yzm1rrFZIsO0bJIH1HuHJNe3dbW8JFcoQn4X48gePk+R81LgsyUfXaudvdNrQIsRWkdO81xac7OoE+nJUjxPnKjTWU+M8/4Osp2v/5fnnVGxCdxM7SZaPIhFnnIXbZJZHjvHsSLBww/zGI2V5ukmKjB2N3Qc=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Question = _t, Response = _t, #"Email Address" = _t, Date = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Question", type text}, {"Response", type text}, {"Email Address", type text}, {"Date", type text}}),
    #"Pivoted Column" = Table.Pivot(#"Changed Type", List.Distinct(#"Changed Type"[Question]), "Question", "Response")
in
    #"Pivoted Column"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to answer your second question, you will see blanks in certain columns as pivot in power query creates all possible combinations with respect to other columns present in data.it is designed that way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Praful&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Nov 2025 04:29:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expression-Error-There-were-too-many-elements-in-the-enumeration/m-p/4876114#M185835</guid>
      <dc:creator>Praful_Potphode</dc:creator>
      <dc:date>2025-11-15T04:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: Expression.Error: There were too many elements in the enumeration to complete the operation.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expression-Error-There-were-too-many-elements-in-the-enumeration/m-p/4876512#M185843</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="531109" data-lia-user-login="e175429" class="lia-mention lia-mention-user"&gt;e175429&lt;/a&gt;&amp;nbsp;I believe buffering the table would remove the enumeration error. I have tried to replicate your requirement using a mockup data and have achieved the output you are expecting. The PBIX file is attached for your reference.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Input Data:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Output:&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;You can remove the last before step if you want to display nulls instead of "No Response" for the users who haven't answered the questions.&lt;BR /&gt;&lt;BR /&gt;Hope this helps !&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Jai&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Nov 2025 08:01:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expression-Error-There-were-too-many-elements-in-the-enumeration/m-p/4876512#M185843</guid>
      <dc:creator>Jai-Rathinavel</dc:creator>
      <dc:date>2025-11-16T08:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: Expression.Error: There were too many elements in the enumeration to complete the operation.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expression-Error-There-were-too-many-elements-in-the-enumeration/m-p/4877760#M185879</link>
      <description>&lt;P&gt;Thank you! This worked perfectly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Nov 2025 15:55:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Expression-Error-There-were-too-many-elements-in-the-enumeration/m-p/4877760#M185879</guid>
      <dc:creator>e175429</dc:creator>
      <dc:date>2025-11-17T15:55:17Z</dc:date>
    </item>
  </channel>
</rss>

