<?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: Dax calculation to identify lost business in the last 12 months within a 24 month period in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-calculation-to-identify-lost-business-in-the-last-12-months/m-p/3198315#M116173</link>
    <description>&lt;P&gt;You could create a table like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Lost customers =
VAR Last12Months =
    DATESBETWEEN (
        'Date'[Date],
        DATE ( YEAR ( TODAY () ) - 1, MONTH ( TODAY () ), DAY ( TODAY () ) ),
        TODAY ()
    )
VAR Prev12Months =
    DATEADD ( Last12Months, -1, YEAR )
VAR Last12MonthsCustomers =
    CALCULATETABLE ( DISTINCT ( Orders[Customer ID] ), Last12Months )
VAR Prev12MonthsCustomers =
    CALCULATETABLE ( DISTINCT ( Orders[Customer ID] ), Prev12Months )
VAR Result =
    EXCEPT ( Prev12MonthsCustomers, Last12MonthsCustomers )
RETURN
    Result
&lt;/LI-CODE&gt;
&lt;P&gt;You should then be able to link that to your customer dimension.&lt;/P&gt;</description>
    <pubDate>Thu, 20 Apr 2023 14:41:49 GMT</pubDate>
    <dc:creator>johnt75</dc:creator>
    <dc:date>2023-04-20T14:41:49Z</dc:date>
    <item>
      <title>Dax calculation to identify lost business in the last 12 months within a 24 month period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-calculation-to-identify-lost-business-in-the-last-12-months/m-p/3198275#M116169</link>
      <description>&lt;P&gt;I have a data set which covers the last 24 trading months at job level for each of our customers.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to establish out of all these accounts how we identify lost business across the last 12 months.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ie Customers were trading in the previous 12 months, now not traded in the last current 12 months.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Someone Please help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 14:24:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-calculation-to-identify-lost-business-in-the-last-12-months/m-p/3198275#M116169</guid>
      <dc:creator>KristianHamlin</dc:creator>
      <dc:date>2023-04-20T14:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: Dax calculation to identify lost business in the last 12 months within a 24 month period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-calculation-to-identify-lost-business-in-the-last-12-months/m-p/3198315#M116173</link>
      <description>&lt;P&gt;You could create a table like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Lost customers =
VAR Last12Months =
    DATESBETWEEN (
        'Date'[Date],
        DATE ( YEAR ( TODAY () ) - 1, MONTH ( TODAY () ), DAY ( TODAY () ) ),
        TODAY ()
    )
VAR Prev12Months =
    DATEADD ( Last12Months, -1, YEAR )
VAR Last12MonthsCustomers =
    CALCULATETABLE ( DISTINCT ( Orders[Customer ID] ), Last12Months )
VAR Prev12MonthsCustomers =
    CALCULATETABLE ( DISTINCT ( Orders[Customer ID] ), Prev12Months )
VAR Result =
    EXCEPT ( Prev12MonthsCustomers, Last12MonthsCustomers )
RETURN
    Result
&lt;/LI-CODE&gt;
&lt;P&gt;You should then be able to link that to your customer dimension.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 14:41:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-calculation-to-identify-lost-business-in-the-last-12-months/m-p/3198315#M116173</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-04-20T14:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: Dax calculation to identify lost business in the last 12 months within a 24 month period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-calculation-to-identify-lost-business-in-the-last-12-months/m-p/3198344#M116177</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="139949" data-lia-user-login="KristianHamlin" class="lia-mention lia-mention-user"&gt;KristianHamlin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try to add a calculated table like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Table = 
VAR List24M =
CALCULATETABLE(
    VALUES(TableName[Customer]),
    TableName[DATE]&amp;gt;=EDATE(TODAY(), -24)
)
VAR List12M =
CALCULATETABLE(
    VALUES(TableName[Customer]),
    TableName[DATE]&amp;gt;=EDATE(TODAY(), -12)
)
RETURN
EXCEPT(
    List24M,
    List12M
)&lt;/LI-CODE&gt;&lt;P&gt;tried with a table like:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;it worked like:&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;P&gt;or you use the code as filter argument for CALCULATE for further aggregations.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 14:53:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-calculation-to-identify-lost-business-in-the-last-12-months/m-p/3198344#M116177</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-04-20T14:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: Dax calculation to identify lost business in the last 12 months within a 24 month period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-calculation-to-identify-lost-business-in-the-last-12-months/m-p/3198374#M116179</link>
      <description>&lt;P&gt;i.e. you may create measures like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LostCount = 
VAR List24M =
CALCULATETABLE(
    VALUES(TableName[Customer]),
    TableName[DATE]&amp;gt;=EDATE(TODAY(), -24)
)
VAR List12M =
CALCULATETABLE(
    VALUES(TableName[Customer]),
    TableName[DATE]&amp;gt;=EDATE(TODAY(), -12)
)
VAR LostList =
EXCEPT(
    List24M,
    List12M
)
RETURN 
    COUNTROWS(LostList)&lt;/LI-CODE&gt;&lt;P&gt;or&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LostList = 
VAR List24M =
CALCULATETABLE(
    VALUES(TableName[Customer]),
    TableName[DATE]&amp;gt;=EDATE(TODAY(), -24)
)
VAR List12M =
CALCULATETABLE(
    VALUES(TableName[Customer]),
    TableName[DATE]&amp;gt;=EDATE(TODAY(), -12)
)
VAR LostList =
EXCEPT(
    List24M,
    List12M
)
RETURN 
    CONCATENATEX(LostList, TableName[Customer], ", ")&lt;/LI-CODE&gt;&lt;P&gt;they worked like:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 15:00:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-calculation-to-identify-lost-business-in-the-last-12-months/m-p/3198374#M116179</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-04-20T15:00:12Z</dc:date>
    </item>
  </channel>
</rss>

