<?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: Slicer with different output in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-with-different-output/m-p/4386267#M174126</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;,&lt;BR /&gt;This requirement is related to Port-to-port dashboard which consist of types of port services &amp;amp; lead time. The earlier given example is actually one of the seaport from point A to point B in the existing trade from the database. There are long list of other port names&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Because the user wants to "force" showing other ports when selected the port name that is under the same category (which is the group name) instead of having a hierarchy dropdown slicer the group name which the user rejected&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I have included a &lt;A href="https://github.com/ywjrachel/DataAnalystPortfolioProject/blob/main/data_sample.pbix" target="_blank" rel="noopener"&gt;sample PBIX&lt;/A&gt; for testing&lt;/P&gt;</description>
    <pubDate>Wed, 29 Jan 2025 13:44:16 GMT</pubDate>
    <dc:creator>ArtemisRaeWJ</dc:creator>
    <dc:date>2025-01-29T13:44:16Z</dc:date>
    <item>
      <title>Slicer with different output</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-with-different-output/m-p/4384874#M174043</link>
      <description>&lt;P&gt;Hi community, I need guidance on this particular request.&lt;BR /&gt;I have a PBI port-to-port dashboard. The objective is to show types of port services &amp;amp; lead time from point A to point B&amp;nbsp;in our existing trade in the database. Current roadblock is user want to show other output under the same group name &amp;amp; it needs to be dynamic. Here a sample data table:-&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Port_Code&lt;/TD&gt;&lt;TD&gt;Port_Name&lt;/TD&gt;&lt;TD&gt;Group_Name&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ADL&lt;/TD&gt;&lt;TD&gt;Adelaide&lt;/TD&gt;&lt;TD&gt;Southern Australia&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;HBA&lt;/TD&gt;&lt;TD&gt;Hobart&lt;/TD&gt;&lt;TD&gt;Southern Australia&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;MEL&lt;/TD&gt;&lt;TD&gt;Melbourne&lt;/TD&gt;&lt;TD&gt;Southern Australia&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SYD&lt;/TD&gt;&lt;TD&gt;Sydney&lt;/TD&gt;&lt;TD&gt;Southern Australia&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;TSV&lt;/TD&gt;&lt;TD&gt;Townsville&lt;/TD&gt;&lt;TD&gt;Southern Australia&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example scenario :-&lt;BR /&gt;If I select "Adelaide" in the "Port of Loading" Slicer &amp;amp; "Laem Chabang" in the "Port of Discharge" slicer, in the table output must show the alternative ports in "Port of Loading" that is under "Southern Australia" group name which is Adelaide, Melbourne &amp;amp; Sydney.&amp;nbsp;&lt;BR /&gt;User also requested to do away of including group name in the&amp;nbsp;hierarchy drop down slicers.&lt;BR /&gt;Slicer Layout&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table output&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried to adapt one of the DAX from YT video by SQLBI &amp;nbsp;&lt;A title="Show last 6 months based on user single slicer selection" href="https://www.youtube.com/watch?v=d8Rm7dwM6gc&amp;amp;t=1056s" target="_blank" rel="noopener"&gt;Show last 6 months based on user single slicer selection&lt;/A&gt;&amp;nbsp;that might work for this requirement, but&amp;nbsp;I got a blank output&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;LI-CODE lang="python"&gt;POL Outbound Select = 
VAR SelectedPOL = SELECTEDVALUE('data_sample'[Port_of_Loading])
VAR ReferenceGroupNameBySelectedPortName =
    IF(
        NOT(ISBLANK(SelectedPOL)),
        CALCULATE(
            FIRSTNONBLANK('data_sample'[Port_of_Loading_Group_Name], 1),
            'data_sample'[Port_of_Loading] = SelectedPOL
        ),
        BLANK() 
    )
VAR Result =
    CALCULATE(
        SELECTEDMEASURE(),
        REMOVEFILTERS('data_sample'[Port_of_Loading_Group_Name]),
        REMOVEFILTERS('alt_data_sample'[Port_of_Loading]), // from dim table of 'data_sample'
        FILTER(
            'data_sample',
            'data_sample'[Port_of_Loading_Group_Name]
        ), 
        USERELATIONSHIP('data_sample'[Port_Code], 'alt_data_sample'[Port_Code])
    )
RETURN
    Result&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/ywjrachel/DataAnalystPortfolioProject/blob/main/data_sample.pbix" target="_blank" rel="noopener"&gt;Sample PBIX file&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hope to get some help on this matter here or other workaround &amp;amp; let me know if you need more infomation. Thank you in advance&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2025 13:53:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-with-different-output/m-p/4384874#M174043</guid>
      <dc:creator>ArtemisRaeWJ</dc:creator>
      <dc:date>2025-01-29T13:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: Slicer with different output</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-with-different-output/m-p/4385532#M174090</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="920548" data-lia-user-login="ArtemisRaeWJ" class="lia-mention lia-mention-user"&gt;ArtemisRaeWJ&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for reaching out to us.&lt;/P&gt;
&lt;P&gt;Not very clear about your requirement. Why did you choose "Laem Chabang" to return to "Southern Australia", and how are the two related in the data model?&lt;/P&gt;
&lt;P&gt;Please describe the relationship between them in more detail.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Stephen Tao&lt;BR /&gt;&lt;BR /&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2025 06:41:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-with-different-output/m-p/4385532#M174090</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-01-29T06:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: Slicer with different output</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-with-different-output/m-p/4386267#M174126</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;,&lt;BR /&gt;This requirement is related to Port-to-port dashboard which consist of types of port services &amp;amp; lead time. The earlier given example is actually one of the seaport from point A to point B in the existing trade from the database. There are long list of other port names&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Because the user wants to "force" showing other ports when selected the port name that is under the same category (which is the group name) instead of having a hierarchy dropdown slicer the group name which the user rejected&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I have included a &lt;A href="https://github.com/ywjrachel/DataAnalystPortfolioProject/blob/main/data_sample.pbix" target="_blank" rel="noopener"&gt;sample PBIX&lt;/A&gt; for testing&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2025 13:44:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-with-different-output/m-p/4386267#M174126</guid>
      <dc:creator>ArtemisRaeWJ</dc:creator>
      <dc:date>2025-01-29T13:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: Slicer with different output</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-with-different-output/m-p/4392401#M174367</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have found the solution for this case.&lt;/P&gt;&lt;PRE&gt;CountRows PortGroups = 
VAR _selectedPortGroup = SELECTEDVALUE(helpTable[Port Group])

RETURN

CALCULATE(COUNTROWS(originalTable), originalTable[Port Group] = _selectedPortGroup)&lt;/PRE&gt;&lt;P&gt;Credits to Reddit user:&amp;nbsp;frithjof_v. Click &lt;A title="Slicer + table advance mode" href="https://www.reddit.com/r/PowerBI/comments/1ie66kq/slicer_table_advance_mode/" target="_self"&gt;here&lt;/A&gt; for more info in the steps&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2025 11:52:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-with-different-output/m-p/4392401#M174367</guid>
      <dc:creator>ArtemisRaeWJ</dc:creator>
      <dc:date>2025-02-03T11:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: Slicer with different output</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-with-different-output/m-p/4393505#M174412</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="920548" data-lia-user-login="ArtemisRaeWJ" class="lia-mention lia-mention-user"&gt;ArtemisRaeWJ&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Really glad to hear that your problem has been solved.&lt;/P&gt;
&lt;P&gt;If possible, please accept it as a solution. More people will benefit from your reply.&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Stephen Tao&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 05:42:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-with-different-output/m-p/4393505#M174412</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-02-04T05:42:51Z</dc:date>
    </item>
  </channel>
</rss>

