<?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: Create a table through DAX formula by combining two tables unique record in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-table-through-DAX-formula-by-combining-two-tables/m-p/3139277#M112014</link>
    <description>&lt;P&gt;Hey my friend,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You can use a table with&lt;BR /&gt;&lt;BR /&gt;merge =&lt;BR /&gt;&lt;BR /&gt;DISTINCT(UNION(&lt;BR /&gt;SELECTCOLUMNS(Table_a, "Coluna1", [Expressão1], "Coluna2", [Expressão2], ...),&lt;BR /&gt;SELECTCOLUMNS(Table_b, "Coluna1", [Expressão1], "Coluna2", [Expressão2], ...)&lt;BR /&gt;))&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If you need all lines, just remove the distinct part.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If it solved your problem, give me a kudo!!! &lt;span class="lia-unicode-emoji" title=":red_heart:"&gt;❤️&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Mar 2023 15:42:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-03-17T15:42:47Z</dc:date>
    <item>
      <title>Create a table through DAX formula by combining two tables unique record</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-table-through-DAX-formula-by-combining-two-tables/m-p/3139224#M112013</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have two tables, forecast &amp;amp; actual, where data is at the country &amp;amp; Product levels. I want to compare how I am doing against the forecast at an aggregate level and by country &amp;amp; product level. It is possible that for a few countries, I don't have a forecast but have actuals vv few countries have forecast but don't have actuals. I am trying to create a 3rd table where I can see all the countries, including ones that have no forecast, but actual vv have forecast but no actuals. The table looks like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Forecast table&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Country&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Product&amp;nbsp; &amp;nbsp; Sales&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Country 1&amp;nbsp; &amp;nbsp; product 1 100&lt;/P&gt;&lt;P&gt;Country 2&amp;nbsp; &amp;nbsp; product 2&amp;nbsp; 200&lt;/P&gt;&lt;P&gt;Country 5&amp;nbsp; &amp;nbsp; &amp;nbsp;product1&amp;nbsp; 100&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Actual table&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Country&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Product&amp;nbsp; &amp;nbsp; Sales&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Country 1&amp;nbsp; &amp;nbsp; product 1 120&lt;/P&gt;&lt;P&gt;Country 4&amp;nbsp; &amp;nbsp; product 2&amp;nbsp; 220&lt;/P&gt;&lt;P&gt;Country 3&amp;nbsp; &amp;nbsp; product 1&amp;nbsp; 200&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Desired table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Country&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Product&amp;nbsp; &amp;nbsp; ForecastSales&amp;nbsp; &amp;nbsp;Actual Sales&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Country 1&amp;nbsp; &amp;nbsp; product 1 100&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;120&lt;/P&gt;&lt;P&gt;Country 2&amp;nbsp; &amp;nbsp; product 2&amp;nbsp; 200&lt;/P&gt;&lt;P&gt;Country 3&amp;nbsp; &amp;nbsp; product 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 200&lt;/P&gt;&lt;P&gt;Country 4&amp;nbsp; &amp;nbsp; product 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 220&lt;/P&gt;&lt;P&gt;Country 5&amp;nbsp; &amp;nbsp; &amp;nbsp;product1&amp;nbsp; 100&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help if possible&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 15:13:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-table-through-DAX-formula-by-combining-two-tables/m-p/3139224#M112013</guid>
      <dc:creator>abhishekrws01</dc:creator>
      <dc:date>2023-03-17T15:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Create a table through DAX formula by combining two tables unique record</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-table-through-DAX-formula-by-combining-two-tables/m-p/3139277#M112014</link>
      <description>&lt;P&gt;Hey my friend,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You can use a table with&lt;BR /&gt;&lt;BR /&gt;merge =&lt;BR /&gt;&lt;BR /&gt;DISTINCT(UNION(&lt;BR /&gt;SELECTCOLUMNS(Table_a, "Coluna1", [Expressão1], "Coluna2", [Expressão2], ...),&lt;BR /&gt;SELECTCOLUMNS(Table_b, "Coluna1", [Expressão1], "Coluna2", [Expressão2], ...)&lt;BR /&gt;))&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If you need all lines, just remove the distinct part.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If it solved your problem, give me a kudo!!! &lt;span class="lia-unicode-emoji" title=":red_heart:"&gt;❤️&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 15:42:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-table-through-DAX-formula-by-combining-two-tables/m-p/3139277#M112014</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-17T15:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: Create a table through DAX formula by combining two tables unique record</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-table-through-DAX-formula-by-combining-two-tables/m-p/3140586#M112121</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached pbix file.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;New Table = 
VAR _country =
    DISTINCT (
        UNION ( DISTINCT ( ForecastSales[Country] ), DISTINCT ( ActualSales[Country] ) )
    )
VAR _product =
    DISTINCT (
        UNION ( DISTINCT ( ForecastSales[Product] ), DISTINCT ( ActualSales[Product] ) )
    )
VAR _countryproduct =
    SELECTCOLUMNS (
        GENERATE ( _country, _product ),
        "@country", [Country],
        "@product", [Product]
    )
RETURN
    FILTER (
        ADDCOLUMNS (
            _countryproduct,
            "@ForecastSales",
                CALCULATE (
                    SUM ( ForecastSales[Sales] ),
                    FILTER (
                        ForecastSales,
                        ForecastSales[Country] = [@country]
                            &amp;amp;&amp;amp; ForecastSales[Product] = [@product]
                    )
                ),
            "@ActualSales",
                CALCULATE (
                    SUM ( ActualSales[Sales] ),
                    FILTER (
                        ActualSales,
                        ActualSales[Country] = [@country]
                            &amp;amp;&amp;amp; ActualSales[Product] = [@product]
                    )
                )
        ),
        [@ForecastSales] &amp;lt;&amp;gt; 0
            || [@ActualSales] &amp;lt;&amp;gt; 0
    )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Mar 2023 05:43:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-table-through-DAX-formula-by-combining-two-tables/m-p/3140586#M112121</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2023-03-19T05:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: Create a table through DAX formula by combining two tables unique record</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-table-through-DAX-formula-by-combining-two-tables/m-p/3142311#M112243</link>
      <description>&lt;P&gt;Thank you very much for your help!&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2023 12:18:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-table-through-DAX-formula-by-combining-two-tables/m-p/3142311#M112243</guid>
      <dc:creator>abhishekrws01</dc:creator>
      <dc:date>2023-03-20T12:18:57Z</dc:date>
    </item>
    <item>
      <title>Re: Create a table through DAX formula by combining two tables unique record</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-table-through-DAX-formula-by-combining-two-tables/m-p/3142317#M112244</link>
      <description>&lt;P&gt;Thank you. It gave me the idea to think a bit differently.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2023 12:21:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-table-through-DAX-formula-by-combining-two-tables/m-p/3142317#M112244</guid>
      <dc:creator>abhishekrws01</dc:creator>
      <dc:date>2023-03-20T12:21:05Z</dc:date>
    </item>
  </channel>
</rss>

