<?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: Error while using Table.TransformColumns in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-while-using-Table-TransformColumns/m-p/3937638#M153133</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="653509" data-lia-user-login="AhmadBakr" class="lia-mention lia-mention-user"&gt;AhmadBakr&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Table.TransformColumns&lt;/STRONG&gt;&amp;nbsp;only passes the value in the column being transformed as an argument to the function provided in the 2nd argument. This means that it cannot reference values in columns other than the one being transformed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, you can use &lt;STRONG&gt;Table.ReplaceValue&lt;/STRONG&gt; like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;= Table.ReplaceValue(#"Replaced Value", each [#"FY2023-Jan"], (_) as number =&amp;gt; [#"FY2023-CIF"], Replacer.ReplaceValue, {"FY2023-Jan"})&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See &lt;A href="https://www.thebiccountant.com/2017/07/23/transforming-a-column-with-values-from-another-column-in-powerbi-and-powerquery-in-excel/" target="_blank" rel="noopener"&gt;here.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does this work for you?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
    <pubDate>Wed, 22 May 2024 02:40:53 GMT</pubDate>
    <dc:creator>OwenAuger</dc:creator>
    <dc:date>2024-05-22T02:40:53Z</dc:date>
    <item>
      <title>Error while using Table.TransformColumns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-while-using-Table-TransformColumns/m-p/3937253#M153114</link>
      <description>&lt;P&gt;Any one can help why I am getting this error message:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;Expression.Error: We cannot apply field access to the type Number.&lt;BR /&gt;Details:&lt;BR /&gt;Value=1.387&lt;BR /&gt;Key=FY2023-CIF&lt;/P&gt;&lt;P&gt;When I use this transformation:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;= Table.TransformColumns( #"Replaced Value", { { "FY2023-Jan", each [#"FY2023-CIF"] } } )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to replace the values in "FY-2023-Jan" column with those in "FY2023-CIF" column&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 22:36:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-while-using-Table-TransformColumns/m-p/3937253#M153114</guid>
      <dc:creator>AhmadBakr</dc:creator>
      <dc:date>2024-05-21T22:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: Error while using Table.TransformColumns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-while-using-Table-TransformColumns/m-p/3937638#M153133</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="653509" data-lia-user-login="AhmadBakr" class="lia-mention lia-mention-user"&gt;AhmadBakr&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Table.TransformColumns&lt;/STRONG&gt;&amp;nbsp;only passes the value in the column being transformed as an argument to the function provided in the 2nd argument. This means that it cannot reference values in columns other than the one being transformed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, you can use &lt;STRONG&gt;Table.ReplaceValue&lt;/STRONG&gt; like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;= Table.ReplaceValue(#"Replaced Value", each [#"FY2023-Jan"], (_) as number =&amp;gt; [#"FY2023-CIF"], Replacer.ReplaceValue, {"FY2023-Jan"})&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See &lt;A href="https://www.thebiccountant.com/2017/07/23/transforming-a-column-with-values-from-another-column-in-powerbi-and-powerquery-in-excel/" target="_blank" rel="noopener"&gt;here.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does this work for you?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2024 02:40:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-while-using-Table-TransformColumns/m-p/3937638#M153133</guid>
      <dc:creator>OwenAuger</dc:creator>
      <dc:date>2024-05-22T02:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: Error while using Table.TransformColumns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-while-using-Table-TransformColumns/m-p/3966093#M153848</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6799" data-lia-user-login="OwenAuger" class="lia-mention lia-mention-user"&gt;OwenAuger&lt;/a&gt;&amp;nbsp;thank you very much for the info and the workaround.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pardon my late response, I have been extremly overloaded and working late nights. This is the first time I log into the forum since I posted the question.&lt;/P&gt;</description>
      <pubDate>Sat, 01 Jun 2024 21:53:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-while-using-Table-TransformColumns/m-p/3966093#M153848</guid>
      <dc:creator>AhmadBakr</dc:creator>
      <dc:date>2024-06-01T21:53:39Z</dc:date>
    </item>
  </channel>
</rss>

