<?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 How do I append two sources in DAX code instead of the append button? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-append-two-sources-in-DAX-code-instead-of-the-append/m-p/3150373#M112828</link>
    <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two JSON sources.&amp;nbsp;&lt;BR /&gt;Normally I would have to create two seperate JSON sources and append the 2nd to the first.&amp;nbsp;&lt;BR /&gt;Can someone write me out the code to do it all in one?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the first code, the 2nd code looks exactly the same just comes from a different system&amp;nbsp;&lt;/P&gt;&lt;P&gt;let&lt;BR /&gt;Source = Json.Document(Web.Contents(" &lt;STRONG&gt;URL IS HERE&lt;/STRONG&gt; ")),&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(IS IT POSSIBLE TO JOIN THEM HERE, LIKE URL 1+ URL 2)&amp;nbsp;&lt;/STRONG&gt;&lt;BR /&gt;#"Converted to Table" = Table.FromRecords({Source}),&lt;BR /&gt;#"Expanded data" = Table.ExpandListColumn(#"Converted to Table", "data"),&lt;BR /&gt;#"Expanded data1" = Table.ExpandRecordColumn(#"Expanded data", "data", {"account_name"}, {"data.account_name"}),&lt;BR /&gt;#"Changed Type" = Table.TransformColumnTypes(#"Expanded data1",{{"data.account_name", type text}}),&lt;BR /&gt;#"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"data.account_name", "account_name"}})&lt;BR /&gt;in&lt;BR /&gt;#"Renamed Columns"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(OR IF THE FIRST ISINT POSSIBLE, THIS IS USUALLY WHERE THE APPEND SYNTAX IS THAT REFERS TO A DIFFERENT QUERY TABLE, IS IT POSSIBLE TO JUST UNION THE 2ND QUERY HERE)&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Mar 2023 15:20:49 GMT</pubDate>
    <dc:creator>shahid_tanmoy</dc:creator>
    <dc:date>2023-03-23T15:20:49Z</dc:date>
    <item>
      <title>How do I append two sources in DAX code instead of the append button?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-append-two-sources-in-DAX-code-instead-of-the-append/m-p/3150373#M112828</link>
      <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two JSON sources.&amp;nbsp;&lt;BR /&gt;Normally I would have to create two seperate JSON sources and append the 2nd to the first.&amp;nbsp;&lt;BR /&gt;Can someone write me out the code to do it all in one?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the first code, the 2nd code looks exactly the same just comes from a different system&amp;nbsp;&lt;/P&gt;&lt;P&gt;let&lt;BR /&gt;Source = Json.Document(Web.Contents(" &lt;STRONG&gt;URL IS HERE&lt;/STRONG&gt; ")),&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(IS IT POSSIBLE TO JOIN THEM HERE, LIKE URL 1+ URL 2)&amp;nbsp;&lt;/STRONG&gt;&lt;BR /&gt;#"Converted to Table" = Table.FromRecords({Source}),&lt;BR /&gt;#"Expanded data" = Table.ExpandListColumn(#"Converted to Table", "data"),&lt;BR /&gt;#"Expanded data1" = Table.ExpandRecordColumn(#"Expanded data", "data", {"account_name"}, {"data.account_name"}),&lt;BR /&gt;#"Changed Type" = Table.TransformColumnTypes(#"Expanded data1",{{"data.account_name", type text}}),&lt;BR /&gt;#"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"data.account_name", "account_name"}})&lt;BR /&gt;in&lt;BR /&gt;#"Renamed Columns"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(OR IF THE FIRST ISINT POSSIBLE, THIS IS USUALLY WHERE THE APPEND SYNTAX IS THAT REFERS TO A DIFFERENT QUERY TABLE, IS IT POSSIBLE TO JUST UNION THE 2ND QUERY HERE)&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:20:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-append-two-sources-in-DAX-code-instead-of-the-append/m-p/3150373#M112828</guid>
      <dc:creator>shahid_tanmoy</dc:creator>
      <dc:date>2023-03-23T15:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: How do I append two sources in DAX code instead of the append button?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-append-two-sources-in-DAX-code-instead-of-the-append/m-p/3153577#M113035</link>
      <description>&lt;P&gt;You are mixing concepts.&amp;nbsp; The process is different in Power Query and in DAX.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Power Query:&lt;/P&gt;
&lt;P&gt;Let's assume you have flattened your JSON into tables QueryA and QueryB.&amp;nbsp; Then indeed you can write&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;= QueryA &amp;amp; QueryB&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to append them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In DAX you would need to use UNION&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;UNION (QueryA,QueryB)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Mar 2023 01:01:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-append-two-sources-in-DAX-code-instead-of-the-append/m-p/3153577#M113035</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2023-03-25T01:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I append two sources in DAX code instead of the append button?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-append-two-sources-in-DAX-code-instead-of-the-append/m-p/3154144#M113080</link>
      <description>&lt;P&gt;You should be able to start with a table with two rows for your two URL values. Then add a custom column with your Json.Document expression where you concatenate in the URL for that row. You should then get a Table in each row you can expand to get your desired final table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pat&lt;/P&gt;</description>
      <pubDate>Sat, 25 Mar 2023 23:04:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-append-two-sources-in-DAX-code-instead-of-the-append/m-p/3154144#M113080</guid>
      <dc:creator>ppm1</dc:creator>
      <dc:date>2023-03-25T23:04:04Z</dc:date>
    </item>
  </channel>
</rss>

