<?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: Show migration between sales channels in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-migration-between-sales-channels/m-p/2275355#M55521</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="350162" data-lia-user-login="mno3nrg" class="lia-mention lia-mention-user"&gt;mno3nrg&lt;/a&gt; , In case you need following sales channel, a new column &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;following sales channel =&lt;BR /&gt;var _max = minx(filter(Table, [customer_id] =earlier([customer_id]) &amp;amp;&amp;amp; [order_id] &amp;gt; earlier([order_id])),[order_id])&lt;BR /&gt;return &lt;BR /&gt;maxx(filter(Table, [customer_id] =earlier([customer_id]) &amp;amp;&amp;amp; [order_id] =_max ),[sales channel])&lt;/P&gt;</description>
    <pubDate>Mon, 10 Jan 2022 12:48:38 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2022-01-10T12:48:38Z</dc:date>
    <item>
      <title>Show migration between sales channels</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-migration-between-sales-channels/m-p/2275335#M55519</link>
      <description>&lt;P&gt;Hello, I'm new to DAX and I'm unfortunately not getting anywhere at this point. I have a table with sales data. Each sale is assigned to a sales channel. I want to use a Sankey chart to show how customers churn between sales channels when they order multiple times.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;My thought was: I use the sales channel column given so far and add another column which contains the sales channel of the next order, if there is another order. So it should show the next sales channel if the customer number stays the same and the column "Order / Customer" grows by 1. Unfortunately I have no idea how to formulate this in DAX.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;In Sankey I would use the actual sales channel as the start and the new column as the target. Does this make sense, and what would happen if customers order only once and then the new column remains empty?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Here is my current table with orders:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;order_id&lt;/TD&gt;&lt;TD&gt;customer_id&lt;/TD&gt;&lt;TD&gt;sales channel&lt;/TD&gt;&lt;TD&gt;order / customer&lt;/TD&gt;&lt;TD&gt;following sales channel&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;TD&gt;Amazon&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;ebay&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;TD&gt;ebay&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;TD&gt;Amazon&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;13&lt;/TD&gt;&lt;TD&gt;Shop&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Amazon&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;13&lt;/TD&gt;&lt;TD&gt;Amazon&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Amazon&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;13&lt;/TD&gt;&lt;TD&gt;Amazon&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If my approach does not make sense, please feel free to give me a better suggestion. It doesn't matter how, but I would like to be able to show the churn between distribution channels.&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jan 2022 12:38:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-migration-between-sales-channels/m-p/2275335#M55519</guid>
      <dc:creator>mno3nrg</dc:creator>
      <dc:date>2022-01-10T12:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Show migration between sales channels</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-migration-between-sales-channels/m-p/2275355#M55521</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="350162" data-lia-user-login="mno3nrg" class="lia-mention lia-mention-user"&gt;mno3nrg&lt;/a&gt; , In case you need following sales channel, a new column &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;following sales channel =&lt;BR /&gt;var _max = minx(filter(Table, [customer_id] =earlier([customer_id]) &amp;amp;&amp;amp; [order_id] &amp;gt; earlier([order_id])),[order_id])&lt;BR /&gt;return &lt;BR /&gt;maxx(filter(Table, [customer_id] =earlier([customer_id]) &amp;amp;&amp;amp; [order_id] =_max ),[sales channel])&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jan 2022 12:48:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-migration-between-sales-channels/m-p/2275355#M55521</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-01-10T12:48:38Z</dc:date>
    </item>
  </channel>
</rss>

