<?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: Two tables(years), same structure, one relation, what function is used in this case? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Two-tables-years-same-structure-one-relation-what-function-is/m-p/911507#M8719</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It was quite fun to solve your Problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At First two sample Tables based on your Information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Data Inside of the Tables.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I build up a new calculated Table I call it Clients. With all Unique Clients as the first Column with this Dax Code.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Clients = DISTINCT(UNION(ALLSELECTED('Client-Year2018'[Client]);ALLSELECTED('Client-Year2019'[Client])))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After that you can calculate for each unique Client if it present or not with the Dax Code below in a new Calculated column.&lt;/P&gt;&lt;P&gt;I Modified it a bit to know if a customer comes new in 2019.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Classification = 

var present2018 = LOOKUPVALUE('Client-Year2018'[Client]; 'Client-Year2018'[Client]; Clients[Client])
var present2019 = LOOKUPVALUE('Client-Year2019'[Client]; 'Client-Year2019'[Client]; Clients[Client])
Return
IF(present2018 = Clients[Client] &amp;amp;&amp;amp; present2019 = Clients[Client]; "continuators"; IF(present2018 = Clients[Client] &amp;amp;&amp;amp; NOT(present2019 = Clients[Client]); "Lost"; IF(NOT(present2018 = Clients[Client]) &amp;amp;&amp;amp; present2019 = Clients[Client]; "New")))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The new Table looks like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this will help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------&lt;BR /&gt;Did I answer your question? Mark my post as a solution!&lt;BR /&gt;It was useful? Press Thumbs Up!&lt;/P&gt;</description>
    <pubDate>Sat, 25 Jan 2020 17:17:38 GMT</pubDate>
    <dc:creator>rainer1</dc:creator>
    <dc:date>2020-01-25T17:17:38Z</dc:date>
    <item>
      <title>Two tables(years), same structure, one relation, what function is used in this case?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Two-tables-years-same-structure-one-relation-what-function-is/m-p/911482#M8718</link>
      <description>&lt;P&gt;Good morning. I have a problem to solve, if you can help me. I have two tables (different year: 2018-2019) with the same structure. I have two important variables in each of those tables : Clients and year. I want to identify two groups :&lt;BR /&gt;The clients that come again in 2019 and classify them as continuators&lt;BR /&gt;Customers who do not come in 2019 : classify them as lost.&lt;BR /&gt;Any idea how? Thank you very much.&lt;/P&gt;</description>
      <pubDate>Sat, 25 Jan 2020 14:23:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Two-tables-years-same-structure-one-relation-what-function-is/m-p/911482#M8718</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-25T14:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Two tables(years), same structure, one relation, what function is used in this case?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Two-tables-years-same-structure-one-relation-what-function-is/m-p/911507#M8719</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It was quite fun to solve your Problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At First two sample Tables based on your Information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Data Inside of the Tables.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I build up a new calculated Table I call it Clients. With all Unique Clients as the first Column with this Dax Code.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Clients = DISTINCT(UNION(ALLSELECTED('Client-Year2018'[Client]);ALLSELECTED('Client-Year2019'[Client])))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After that you can calculate for each unique Client if it present or not with the Dax Code below in a new Calculated column.&lt;/P&gt;&lt;P&gt;I Modified it a bit to know if a customer comes new in 2019.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Classification = 

var present2018 = LOOKUPVALUE('Client-Year2018'[Client]; 'Client-Year2018'[Client]; Clients[Client])
var present2019 = LOOKUPVALUE('Client-Year2019'[Client]; 'Client-Year2019'[Client]; Clients[Client])
Return
IF(present2018 = Clients[Client] &amp;amp;&amp;amp; present2019 = Clients[Client]; "continuators"; IF(present2018 = Clients[Client] &amp;amp;&amp;amp; NOT(present2019 = Clients[Client]); "Lost"; IF(NOT(present2018 = Clients[Client]) &amp;amp;&amp;amp; present2019 = Clients[Client]; "New")))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The new Table looks like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this will help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------&lt;BR /&gt;Did I answer your question? Mark my post as a solution!&lt;BR /&gt;It was useful? Press Thumbs Up!&lt;/P&gt;</description>
      <pubDate>Sat, 25 Jan 2020 17:17:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Two-tables-years-same-structure-one-relation-what-function-is/m-p/911507#M8719</guid>
      <dc:creator>rainer1</dc:creator>
      <dc:date>2020-01-25T17:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: Two tables(years), same structure, one relation, what function is used in this case?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Two-tables-years-same-structure-one-relation-what-function-is/m-p/911528#M8720</link>
      <description>&lt;P&gt;Thank you. Very thankful&lt;/P&gt;</description>
      <pubDate>Sat, 25 Jan 2020 18:21:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Two-tables-years-same-structure-one-relation-what-function-is/m-p/911528#M8720</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-25T18:21:02Z</dc:date>
    </item>
  </channel>
</rss>

