<?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: Dataflow Gen2 Max Effective Date as Parameter in Dataflow</title>
    <link>https://community.fabric.microsoft.com/t5/Dataflow/Dataflow-Gen2-Max-Effective-Date-as-Parameter/m-p/3604016#M1439</link>
    <description>&lt;P&gt;Thanks! That did the trick!&lt;/P&gt;</description>
    <pubDate>Wed, 27 Dec 2023 17:36:03 GMT</pubDate>
    <dc:creator>gmoore7</dc:creator>
    <dc:date>2023-12-27T17:36:03Z</dc:date>
    <item>
      <title>Dataflow Gen2 Max Effective Date as Parameter</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Dataflow-Gen2-Max-Effective-Date-as-Parameter/m-p/3603899#M1435</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a Dataflow Gen2 where I am first querying the Max Effective Date from a table and then trying to use that as a parameter in a query later on in the flow (see screenshot).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running a query (that only returns one row with one column) and getting the date value from that row/column using an aggregation. I am then referencing that in the next query as a "reference query" value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The preview in the 2nd step actually works and I can see my SQL Server receiving the date parameter correctly... and the data preview even populates on the 2nd step with only the data I need, but I keep getting the following mashup error when I publish and run:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;We cannot apply operator #{0} to types #{1} and #{2}., Underlying error: We cannot apply operator &amp;lt; to types Table and Date. Details: Reason = Expression.Error;Message = We cannot apply operator &amp;lt; to types Table and Date.;Detail = [Operator = "&amp;lt;", Left = Table.FromRecords({}), Right = #date(2008, 10, 31)];Message.Format = We cannot apply operator #{0} to types #{1} and #{2}.;Message.Parameters = {"&amp;lt;", "Table", "Date"}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is what I am doing not supported or did I do something wrong?&lt;BR /&gt;&lt;BR /&gt;Here is the advanced editor text for first and 2nd steps:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;let&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; Source = Sql.Database(&lt;/SPAN&gt;&lt;SPAN&gt;"Link to Lakehouse"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"Lakehouse"&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; #"Navigation 1" = Source{[Schema = &lt;/SPAN&gt;&lt;SPAN&gt;"dbo"&lt;/SPAN&gt;&lt;SPAN&gt;, Item = &lt;/SPAN&gt;&lt;SPAN&gt;"view1"&lt;/SPAN&gt;&lt;SPAN&gt;]}[Data],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; #"Changed column type" = Table.TransformColumnTypes(#"Navigation 1", {{&lt;/SPAN&gt;&lt;SPAN&gt;"maxeffdate"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;type&lt;/SPAN&gt; &lt;SPAN&gt;date&lt;/SPAN&gt;&lt;SPAN&gt;}}),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; #"Drill down" = #"Changed column type"[maxeffdate],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; #"Calculated maximum" = List.Max(#"Drill down")&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;in&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; #"Calculated maximum"&lt;BR /&gt;&lt;BR /&gt;...and the 2nd step:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;let&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; Source = Sql.Database(&lt;/SPAN&gt;&lt;SPAN&gt;"SQL Server"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"Database"&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; #"Navigation 1" = Source{[Schema = &lt;/SPAN&gt;&lt;SPAN&gt;"dbo"&lt;/SPAN&gt;&lt;SPAN&gt;, Item = &lt;/SPAN&gt;&lt;SPAN&gt;"table"&lt;/SPAN&gt;&lt;SPAN&gt;]}[Data],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; #"Changed column type" = Table.TransformColumnTypes(#"Navigation 1", {{&lt;/SPAN&gt;&lt;SPAN&gt;"effdate"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;type&lt;/SPAN&gt; &lt;SPAN&gt;date&lt;/SPAN&gt;&lt;SPAN&gt;}}),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; #"Filtered rows" = Table.SelectRows(#"Changed column type", &lt;/SPAN&gt;&lt;SPAN&gt;each&lt;/SPAN&gt;&lt;SPAN&gt; [effdate] &amp;gt; MaxEffDate)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;in&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; #"Filtered rows"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 27 Dec 2023 15:53:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Dataflow-Gen2-Max-Effective-Date-as-Parameter/m-p/3603899#M1435</guid>
      <dc:creator>gmoore7</dc:creator>
      <dc:date>2023-12-27T15:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: Dataflow Gen2 Max Effective Date as Parameter</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Dataflow-Gen2-Max-Effective-Date-as-Parameter/m-p/3604006#M1437</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;Is your first query being staged or not? If it set to be staged then that might be causing an issue as only tables can be staged and scalar values (like the one from a List.Max) will yield an error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can either set your first query to not be staged or change some components of your query so that the aggregation is perhaps done with a Group by and then you do a drill down in the second query to the Max value that you're looking for from the field that you require.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2023 17:20:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Dataflow-Gen2-Max-Effective-Date-as-Parameter/m-p/3604006#M1437</guid>
      <dc:creator>miguel</dc:creator>
      <dc:date>2023-12-27T17:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: Dataflow Gen2 Max Effective Date as Parameter</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Dataflow-Gen2-Max-Effective-Date-as-Parameter/m-p/3604016#M1439</link>
      <description>&lt;P&gt;Thanks! That did the trick!&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2023 17:36:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Dataflow-Gen2-Max-Effective-Date-as-Parameter/m-p/3604016#M1439</guid>
      <dc:creator>gmoore7</dc:creator>
      <dc:date>2023-12-27T17:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: Dataflow Gen2 Max Effective Date as Parameter</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Dataflow-Gen2-Max-Effective-Date-as-Parameter/m-p/3604024#M1440</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="666297" data-lia-user-login="gmoore7" class="lia-mention lia-mention-user"&gt;gmoore7&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Glad that your query got resolved. Please continue using Fabric Community for any help regarding your queries.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2023 17:55:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Dataflow-Gen2-Max-Effective-Date-as-Parameter/m-p/3604024#M1440</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-12-27T17:55:17Z</dc:date>
    </item>
  </channel>
</rss>

