<?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: intersecting streams matrix in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/intersecting-streams-matrix/m-p/4400321#M174694</link>
    <description>&lt;P&gt;thanks a lot&lt;/P&gt;</description>
    <pubDate>Fri, 07 Feb 2025 15:08:15 GMT</pubDate>
    <dc:creator>TamerOmki</dc:creator>
    <dc:date>2025-02-07T15:08:15Z</dc:date>
    <item>
      <title>intersecting streams matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/intersecting-streams-matrix/m-p/4397890#M174613</link>
      <description>&lt;P&gt;Hello dears,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;within my report, I have 4 revenue streams where every user might use multiple streams during the month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm studying the count of users who use each pair of streams.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;within the below link, I added a sample of the raw data in addition to the expected outcome.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.google.com/spreadsheets/d/1sqeFj_VjTEtFli9hranSLtn9c0CQ2HeE-3QoURlu_UU/edit?usp=sharing" target="_blank"&gt;https://docs.google.com/spreadsheets/d/1sqeFj_VjTEtFli9hranSLtn9c0CQ2HeE-3QoURlu_UU/edit?usp=sharing&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;would you please help with the measure?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 09:14:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/intersecting-streams-matrix/m-p/4397890#M174613</guid>
      <dc:creator>TamerOmki</dc:creator>
      <dc:date>2025-02-06T09:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: intersecting streams matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/intersecting-streams-matrix/m-p/4398762#M174661</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="782835" data-lia-user-login="TamerOmki" class="lia-mention lia-mention-user"&gt;TamerOmki&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for providing the sample data and desired outcome. I made a slight modification to the &lt;STRONG&gt;"Raw Data 2"&lt;/STRONG&gt; table. Instead of having both &lt;STRONG&gt;Stream&lt;/STRONG&gt; and &lt;STRONG&gt;Stream1&lt;/STRONG&gt; columns in the same table, we need to &lt;U&gt;create a single table with two columns: "Stream Code" "Stream,"&lt;/U&gt; and duplicate this table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the tables I have taken. Please note that the tables are disconnected, and the "StreamRows" and "StreamCols" tables are, containing only the two columns mentioned above.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Now, we can create the following measure to get the desired result. Here is the DAX&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Unique Users = 
VAR _stCode1 =
    CALCULATE (
        VALUES ( StreamRows[Stream Code] ),
        StreamRows[Stream] = SELECTEDVALUE ( StreamRows[Stream] )
    )
VAR _stCode2 =
    CALCULATE (
        VALUES ( StreamCols[Stream Code] ),
        StreamCols[Stream] = SELECTEDVALUE ( StreamCols[Stream] )
    )
VAR _userCount1 =
    SELECTCOLUMNS ( FILTER ( Users, Users[Strem code] = _stCode1 ), Users[User] )
VAR _userCount2 =
    SELECTCOLUMNS ( FILTER ( Users, Users[Strem code] = _stCode2 ), Users[User] )
VAR _userCount =
    COUNTROWS ( INTERSECT ( _userCount1, _userCount2 ) )
RETURN
    _userCount
&lt;/LI-CODE&gt;
&lt;P&gt;Here is the screenshot of the results:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I am also attaching the Power BI file for your reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Udit&lt;BR /&gt;&lt;BR /&gt;If this post &lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accepting it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;Appreciate your Kudo &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":rocket:"&gt;🚀&lt;/span&gt; Let's Connect: &lt;A href="https://www.linkedin.com/in/quantumudit/" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;LinkedIn&lt;/STRONG&gt;&lt;/A&gt; || &lt;A href="https://www.youtube.com/@quantumudit" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;YouTube&lt;/STRONG&gt;&lt;/A&gt; || &lt;A href="https://medium.com/@quantumudit" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;Medium&lt;/STRONG&gt;&lt;/A&gt; || &lt;A href="https://github.com/quantumudit/" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;GitHub&lt;/STRONG&gt;&lt;/A&gt;&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":sparkles:"&gt;✨&lt;/span&gt; Visit My Linktree: &lt;A href="https://linktr.ee/quantumudit" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;LinkTree&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Proud to be SuperUser&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 19:40:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/intersecting-streams-matrix/m-p/4398762#M174661</guid>
      <dc:creator>quantumudit</dc:creator>
      <dc:date>2025-02-06T19:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: intersecting streams matrix</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/intersecting-streams-matrix/m-p/4400321#M174694</link>
      <description>&lt;P&gt;thanks a lot&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2025 15:08:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/intersecting-streams-matrix/m-p/4400321#M174694</guid>
      <dc:creator>TamerOmki</dc:creator>
      <dc:date>2025-02-07T15:08:15Z</dc:date>
    </item>
  </channel>
</rss>

