<?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 values in data table filtered under different conditions in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/show-values-in-data-table-filtered-under-different-conditions/m-p/3900603#M151997</link>
    <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="564485" data-lia-user-login="tkwh1" class="lia-mention lia-mention-user"&gt;tkwh1&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;You can try to use following measure formula to get Invoiced and shipped count based on inventory group:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Distinct Shipped Count Per Inventory =
CALCULATE (
    COUNTROWS ( VALUE ( Table1[Shipped] ) ),
    FILTER ( ALLSELECTED ( Table1 ), [Invoiced] = "Yes" ),
    VALUES ( Table1[Inventory] )
)&lt;/LI-CODE&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Xiaoxin Sheng&lt;/P&gt;</description>
    <pubDate>Wed, 08 May 2024 01:56:20 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-05-08T01:56:20Z</dc:date>
    <item>
      <title>show values in data table filtered under different conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/show-values-in-data-table-filtered-under-different-conditions/m-p/3899182#M151956</link>
      <description>&lt;P&gt;Hello all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need help with DAX code that would produce results in a matrix table under the following conditions.&amp;nbsp; So far not much luck..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Conditions&lt;/U&gt;&lt;/P&gt;&lt;P&gt;For example, i have the following data with items under "Inventory",&amp;nbsp; "Shipped", and "Invoiced" column.&lt;/P&gt;&lt;P&gt;The actual table consists of thousands of rows, and the items in "Inventory", "Shipped" are not unique.&amp;nbsp; They can consist of same/similar items.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;The requirement&lt;/U&gt;&lt;/P&gt;&lt;P&gt;1) Filter "Invoiced" column as "No".&amp;nbsp; &amp;nbsp;(this will determine the "Inventory" items)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2)&amp;nbsp; Based on the Inventory items in 1), I need all of the "Shipped" items for each Inventory item, if the "Invoiced" condition is set to "Yes".&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*In the actual data, per each "Inventory" item, it will usually consist of 1 or more "Shipped" items.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;Inventory&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;Shipped&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;Invoiced&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="3"&gt;A&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="3"&gt;Z&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="3"&gt;Yes&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="3"&gt;B&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="3"&gt;Y&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="3"&gt;No&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="3"&gt;C&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="3"&gt;X&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="3"&gt;Yes&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="3"&gt;A&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="3"&gt;W&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="3"&gt;No&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="3"&gt;B&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="3"&gt;V&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="3"&gt;Yes&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="3"&gt;C&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="3"&gt;U&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="3"&gt;Yes&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="3"&gt;A&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="3"&gt;T&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="3"&gt;No&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="3"&gt;B&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="3"&gt;S&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="3"&gt;Yes&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="3"&gt;C&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="3"&gt;R&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="3"&gt;No&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="3"&gt;A&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="3"&gt;Q&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="3"&gt;Yes&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="3"&gt;・&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="3"&gt;・&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="3"&gt;・&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="3"&gt;・&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="3"&gt;・&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="3"&gt;・&lt;/FONT&gt;&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;Thank you in advance!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2024 13:52:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/show-values-in-data-table-filtered-under-different-conditions/m-p/3899182#M151956</guid>
      <dc:creator>tkwh1</dc:creator>
      <dc:date>2024-05-07T13:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: show values in data table filtered under different conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/show-values-in-data-table-filtered-under-different-conditions/m-p/3900603#M151997</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="564485" data-lia-user-login="tkwh1" class="lia-mention lia-mention-user"&gt;tkwh1&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;You can try to use following measure formula to get Invoiced and shipped count based on inventory group:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Distinct Shipped Count Per Inventory =
CALCULATE (
    COUNTROWS ( VALUE ( Table1[Shipped] ) ),
    FILTER ( ALLSELECTED ( Table1 ), [Invoiced] = "Yes" ),
    VALUES ( Table1[Inventory] )
)&lt;/LI-CODE&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 01:56:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/show-values-in-data-table-filtered-under-different-conditions/m-p/3900603#M151997</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-08T01:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: show values in data table filtered under different conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/show-values-in-data-table-filtered-under-different-conditions/m-p/3907690#M152226</link>
      <description>&lt;P&gt;hi Xiaoxin,&lt;/P&gt;&lt;P&gt;Thank you for your response, really appreciate the suggested code you provided.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried it and thought it had worked initially, but after checking the result, it seems that the "Inventory" items displayed included other Inventory items as well.&lt;/P&gt;&lt;P&gt;Using your code I tried different variations but still cannot get the exact result I need.,,&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 07:48:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/show-values-in-data-table-filtered-under-different-conditions/m-p/3907690#M152226</guid>
      <dc:creator>tkwh1</dc:creator>
      <dc:date>2024-05-10T07:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: show values in data table filtered under different conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/show-values-in-data-table-filtered-under-different-conditions/m-p/3912791#M152343</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="564485" data-lia-user-login="tkwh1" class="lia-mention lia-mention-user"&gt;tkwh1&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;It seems like I missed the first condition to filter items which 'Invoiced' field equal to 'No' , you can try to the following measure formula if it suitable for your requirement:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Distinct Shipped Count Per Inventory =
VAR InventoryList =
    CALCULATETABLE (
        VALUES ( Table1[Inventory] ),
        FILTER ( ALLSELECTED ( Table1 ), [Invoiced] = "No" )
    )
RETURN
    CALCULATE (
        COUNTROWS ( VALUES ( Table1[Shipped] ) ),
        FILTER (
            ALLSELECTED ( Table1 ),
            [Invoiced] = "Yes"
                &amp;amp;&amp;amp; [Inventory] IN InventoryList
        ),
        VALUES ( Table1[Inventory] )
    )&lt;/LI-CODE&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 05:44:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/show-values-in-data-table-filtered-under-different-conditions/m-p/3912791#M152343</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-13T05:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: show values in data table filtered under different conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/show-values-in-data-table-filtered-under-different-conditions/m-p/3972684#M154051</link>
      <description>&lt;P&gt;hi Xiaoxin,&lt;/P&gt;&lt;P&gt;Thank you for your response and the additional code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried this and it shows up as blank, so I will see what else I can do on my end.&lt;/P&gt;&lt;P&gt;In the meantime I have accepted your response as the solution (please let me know if it is not the case).&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2024 02:04:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/show-values-in-data-table-filtered-under-different-conditions/m-p/3972684#M154051</guid>
      <dc:creator>tkwh1</dc:creator>
      <dc:date>2024-06-05T02:04:03Z</dc:date>
    </item>
  </channel>
</rss>

