<?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: Getting all subsequent sales after slicer choice in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-all-subsequent-sales-after-slicer-choice/m-p/2780842#M87006</link>
    <description>&lt;P&gt;pbix file is uploaded now. Enjoy such a brain teaser, enjoy DAX!&lt;/P&gt;</description>
    <pubDate>Tue, 20 Sep 2022 13:20:31 GMT</pubDate>
    <dc:creator>CNENFRNL</dc:creator>
    <dc:date>2022-09-20T13:20:31Z</dc:date>
    <item>
      <title>Getting all subsequent sales after slicer choice</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-all-subsequent-sales-after-slicer-choice/m-p/2777156#M86723</link>
      <description>&lt;P&gt;Dear forum,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It will be my first post here after working for over 4 years with PowerBI. I came across a challenge which I can't seem to solve by myself so I could really use your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The premis&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have created a very simple (fictive) dataset to define my challenge. The dataset contains two tables:&lt;/P&gt;&lt;P&gt;- Products which is a lookup table&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;ProductName&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;ProductID&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;ProductGroup&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product A&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Group A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product B&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Group A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product C&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;Group A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product D&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;Group A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product E&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;Group B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product F&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;Group B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product G&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;Group B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product H&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;Group B&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Sales is the table where all the sold products are registered per customer&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;ProductID&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;CustomerID&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Sequence&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;S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gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The challenge&lt;/STRONG&gt;&lt;BR /&gt;I want to have a slicer on productname and once the user has selected a product, i would like to see the subsequent productsales that have been done.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here is a visualisation of what i am tryng to accomplish:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The multicolored table is the Sales table with three scenarios.&lt;/P&gt;&lt;P&gt;The yellow table is the result of the slicer choice&lt;/P&gt;&lt;P&gt;The green table is the desired output&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried a dynamic table and also tried to search for comparing scenario's online but was not succesfull.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here is the link to the source excel file and pbix file.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://adisbv-my.sharepoint.com/:f:/g/personal/andersdonker_adisbv_onmicrosoft_com/EjgCgJqaMs1MiLlPxfYNbrABkEauj3PmdM3ZzIHF3pAZRA?e=bybX7Z" target="_self"&gt;PowerBI and Excel file&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advanced!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anders Donker&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2022 09:24:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-all-subsequent-sales-after-slicer-choice/m-p/2777156#M86723</guid>
      <dc:creator>AndersDonker</dc:creator>
      <dc:date>2022-09-19T09:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: Getting all subsequent sales after slicer choice</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-all-subsequent-sales-after-slicer-choice/m-p/2777176#M86726</link>
      <description>&lt;P&gt;One small addition:&lt;/P&gt;&lt;P&gt;I would like to have a dynamic table or a DAX measure that counts the subsequent Sales per productname as i am not sure if a dynamic table would work in a tabular model.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2022 09:29:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-all-subsequent-sales-after-slicer-choice/m-p/2777176#M86726</guid>
      <dc:creator>AndersDonker</dc:creator>
      <dc:date>2022-09-19T09:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Getting all subsequent sales after slicer choice</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-all-subsequent-sales-after-slicer-choice/m-p/2777818#M86784</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="442427" data-lia-user-login="AndersDonker" class="lia-mention lia-mention-user"&gt;AndersDonker&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Is this what you're looking for?&amp;nbsp;&amp;nbsp;Please see attached file.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Count = 
VAR SelectedProduct =
    MAXX (
        CALCULATETABLE (
            VALUES ( Products[ProductID] ),
            ALLSELECTED ( Products[ProductName] )
        ),
        Products[ProductID]
    )
RETURN
    SUMX (
        CALCULATETABLE (
            SUMMARIZE (
                Sales,
                Products[ProductName],
                Sales[CustomerID],
                Sales[Sequence],
                Sales[SaleDate]
            ),
            ALL ( Products[ProductName] )
        ),
        VAR CurrentDate = Sales[SaleDate]
        VAR CurrentCustomerTable =
            CALCULATETABLE ( Sales, ALLEXCEPT ( Sales, Sales[CustomerID] ) )
        VAR T1 =
            FILTER ( CurrentCustomerTable, Sales[ProductID] = SelectedProduct )
        VAR ProductDate =
            MAXX ( T1, Sales[SaleDate] )
        RETURN
            IF ( CurrentDate &amp;gt; ProductDate, 1 )
    )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2022 13:36:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-all-subsequent-sales-after-slicer-choice/m-p/2777818#M86784</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-09-19T13:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: Getting all subsequent sales after slicer choice</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-all-subsequent-sales-after-slicer-choice/m-p/2778098#M86813</link>
      <description>&lt;LI-CODE lang="markup"&gt;_ = 
VAR __id =
    CALCULATE( MAX( SALES[CustomerID] ), ALLEXCEPT( SALES, SALES[CustomerID] ) )
VAR __ds =
    CALCULATETABLE(
        SUMMARIZE( SALES, SALES[CustomerID], SALES[Sequence] ),
        ALLEXCEPT( SALES, PROD[ProductName] )
    )
VAR __seq =
    MAXX( FILTER( __ds, SALES[CustomerID] = __id ), SALES[Sequence] )
RETURN
    IF(
        NOT ISBLANK( __seq )
            &amp;amp;&amp;amp; __seq
                &amp;lt; CALCULATE( MAX( SALES[Sequence] ), ALLEXCEPT( SALES, SALES[Sequence] ) ),
        ""
    )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2022 15:29:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-all-subsequent-sales-after-slicer-choice/m-p/2778098#M86813</guid>
      <dc:creator>CNENFRNL</dc:creator>
      <dc:date>2022-09-19T15:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Getting all subsequent sales after slicer choice</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-all-subsequent-sales-after-slicer-choice/m-p/2779668#M86940</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="250150" data-lia-user-login="CNENFRNL" class="lia-mention lia-mention-user"&gt;CNENFRNL&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the quick answer. You managed to pull off exactly what I asked for, however, my initial questioning was not adequate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The desired output would be the counts of subsequent products per productname.&lt;/P&gt;&lt;P&gt;So when selecting Product B from the slicer. I would like to see the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Count = 8 --&amp;gt; as 8 subsequent products sold.&lt;/P&gt;&lt;P&gt;And i would like to re-use the Products lookup table to give some additional depth to the Subsequent productcount.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So once the dax measure is added to a chart or a table with the addition of ProductGroup and ProductName.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Resulting into the following table:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Products.ProductName&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Products.ProductGroup&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Count&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product A&lt;/TD&gt;&lt;TD&gt;Group A&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product C&lt;/TD&gt;&lt;TD&gt;Group A&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product D&lt;/TD&gt;&lt;TD&gt;Group A&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product E&lt;/TD&gt;&lt;TD&gt;Group B&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product F&lt;/TD&gt;&lt;TD&gt;Group B&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product G&lt;/TD&gt;&lt;TD&gt;Group B&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product H&lt;/TD&gt;&lt;TD&gt;Group B&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 07:22:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-all-subsequent-sales-after-slicer-choice/m-p/2779668#M86940</guid>
      <dc:creator>AndersDonker</dc:creator>
      <dc:date>2022-09-20T07:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: Getting all subsequent sales after slicer choice</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-all-subsequent-sales-after-slicer-choice/m-p/2779688#M86942</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp; i have the same response to your solution as for CNENFRNL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the quick answer. You managed to pull off exactly what I asked for, however, my initial questioning was not adequate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The desired output would be the counts of subsequent products per productname.&lt;/P&gt;&lt;P&gt;So when selecting Product B from the slicer. I would like to see the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Count = 8 --&amp;gt; as 8 subsequent products sold.&lt;/P&gt;&lt;P&gt;And i would like to re-use the Products lookup table to give some additional depth to the Subsequent productcount.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So once the dax measure is added to a chart or a table with the addition of ProductGroup and ProductName.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Resulting into the following table:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Products.ProductName&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Products.ProductGroup&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Count&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product A&lt;/TD&gt;&lt;TD&gt;Group A&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product C&lt;/TD&gt;&lt;TD&gt;Group A&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product D&lt;/TD&gt;&lt;TD&gt;Group A&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product E&lt;/TD&gt;&lt;TD&gt;Group B&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product F&lt;/TD&gt;&lt;TD&gt;Group B&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product G&lt;/TD&gt;&lt;TD&gt;Group B&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product H&lt;/TD&gt;&lt;TD&gt;Group B&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Furthermore, what is the standard policy for accepting the solution? You both managed to provide me exactly what i asked for. Unfortunately my question was not adequate enough. Should i accept both your solutions? Or should i accept the solution once my additional question is answered?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 07:28:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-all-subsequent-sales-after-slicer-choice/m-p/2779688#M86942</guid>
      <dc:creator>AndersDonker</dc:creator>
      <dc:date>2022-09-20T07:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: Getting all subsequent sales after slicer choice</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-all-subsequent-sales-after-slicer-choice/m-p/2780414#M86987</link>
      <description>&lt;P&gt;For fun only, a showcase of powerful Excel worksheet formulas,&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PBI solution is way much trickier than you can imagine,&lt;/P&gt;
&lt;P&gt;&lt;img /&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 10:40:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-all-subsequent-sales-after-slicer-choice/m-p/2780414#M86987</guid>
      <dc:creator>CNENFRNL</dc:creator>
      <dc:date>2022-09-20T10:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: Getting all subsequent sales after slicer choice</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-all-subsequent-sales-after-slicer-choice/m-p/2780680#M86997</link>
      <description>&lt;P&gt;Your PowerBI solution seems to do what i had in mind and i was fully aware that it would be quite complex! thats why i posted my first forum question!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you also upload the PowerBI solution so i can review?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 12:35:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-all-subsequent-sales-after-slicer-choice/m-p/2780680#M86997</guid>
      <dc:creator>AndersDonker</dc:creator>
      <dc:date>2022-09-20T12:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: Getting all subsequent sales after slicer choice</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-all-subsequent-sales-after-slicer-choice/m-p/2780715#M87000</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="442427" data-lia-user-login="AndersDonker" class="lia-mention lia-mention-user"&gt;AndersDonker&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Here is another solution I guess as per your requirement. Using a slicer table.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Count = 
VAR SelectedProduct =
    MAX ( 'Product Slicer'[ProductID] )
VAR FilteredTable = 
    FILTER ( ALL ( Sales ), Sales[ProductID] = SelectedProduct )
VAR Result =
    SUMX ( 
        Sales,
        VAR CurrentCustomer = Sales[CustomerID]
        VAR SelectedDate = 
            MAXX ( 
                FILTER ( FilteredTable, Sales[CustomerID] = CurrentCustomer ), 
                Sales[SaleDate] 
            )
        RETURN 
            IF ( 
                Sales[SaleDate] &amp;gt; COALESCE ( SelectedDate, TODAY ( ) ),
                1
            )
    )
RETURN
    Result&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 20 Sep 2022 12:45:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-all-subsequent-sales-after-slicer-choice/m-p/2780715#M87000</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-09-20T12:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: Getting all subsequent sales after slicer choice</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-all-subsequent-sales-after-slicer-choice/m-p/2780842#M87006</link>
      <description>&lt;P&gt;pbix file is uploaded now. Enjoy such a brain teaser, enjoy DAX!&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 13:20:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-all-subsequent-sales-after-slicer-choice/m-p/2780842#M87006</guid>
      <dc:creator>CNENFRNL</dc:creator>
      <dc:date>2022-09-20T13:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: Getting all subsequent sales after slicer choice</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-all-subsequent-sales-after-slicer-choice/m-p/2783108#M87135</link>
      <description>&lt;P&gt;You expert users are exceptional in your speed of response and explanations!&lt;/P&gt;&lt;P&gt;My compliments for the results. I have received &lt;STRONG&gt;two&lt;/STRONG&gt; solutions for a single problem. Thanks! I will accept both solutions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anders Donker&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 07:00:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-all-subsequent-sales-after-slicer-choice/m-p/2783108#M87135</guid>
      <dc:creator>AndersDonker</dc:creator>
      <dc:date>2022-09-22T07:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: Getting all subsequent sales after slicer choice</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-all-subsequent-sales-after-slicer-choice/m-p/2789147#M87514</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;, i decided to go forward with your solution as it gives me the most freedom to reuse the dimensions in the Products table as in the real world i have plenty of dimensions in the Products table which endusers wish to filter upon.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can follow along your solution quite well until i reach the final if statement with the coalesce. Can you elaborate why you are using coalesce with TODAY() and why it is needed? I have trouble comprehending why it's needed. If i remove it from the final solution i get very unexpected results but don't understand why.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, i plan to reuse this measure to calculate the difference in months between the product selected in the slicer and the results produced for subsequent products sold. Any suggestions on how I could reuse this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My plan is to add a slicer with a numerical input between 1 and 12 to give the endusers the freedom to limit the period of subsequent sales. My guess is that the TRUE result of the IF statement, the 1, could be replaced with a datediff function to determine the datediff in months for every row i will have half of my challenge solved. What are your thoughts about that?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With regards and much respect for the given solution (!!),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anders Donker&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 08:47:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-all-subsequent-sales-after-slicer-choice/m-p/2789147#M87514</guid>
      <dc:creator>AndersDonker</dc:creator>
      <dc:date>2022-09-23T08:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: Getting all subsequent sales after slicer choice</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-all-subsequent-sales-after-slicer-choice/m-p/2789456#M87526</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="442427" data-lia-user-login="AndersDonker" class="lia-mention lia-mention-user"&gt;AndersDonker&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Regarding the usage of&amp;nbsp;COALESCE&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt; VAR SelectedDate = &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; MAXX ( &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FILTER ( FilteredTable, Sales[CustomerID] = CurrentCustomer ), &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Sales[SaleDate] &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;If the table which MAXX iterates over is empty then the valiable value would be blank.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt; IF ( &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; Sales[SaleDate] &amp;gt; COALESCE ( SelectedDate, TODAY ( ) ),&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; 1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Now if the value is blank then the IF condition will return TRUE as the&amp;nbsp;Sales[SaleDate] will always be greater than blank. Therefore I return Today being greater than the greatest&amp;nbsp;available date in the sales table in order to force FALSE&amp;nbsp;over this condition as selected date do not actually exist. You need to imagine&amp;nbsp;that.&lt;/P&gt;
&lt;P&gt;For the other part please post a new question with all the details including example of desired results.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 09:50:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Getting-all-subsequent-sales-after-slicer-choice/m-p/2789456#M87526</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-09-23T09:50:52Z</dc:date>
    </item>
  </channel>
</rss>

