<?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: Check if quantity equals in rows with same id in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/Check-if-quantity-equals-in-rows-with-same-id/m-p/3725643#M33112</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="398331" data-lia-user-login="dshmulenson" class="lia-mention lia-mention-user"&gt;dshmulenson&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please try below steps:&lt;/P&gt;
&lt;P&gt;1. below is my test table&lt;/P&gt;
&lt;P&gt;Table:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;2. create a new column with below dax formula&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;IsQuantityEqualForAvailableStatus =
VAR currentItemID = 'Table'[Item ID]
VAR currentQuantity = 'Table'[Quantity]
VAR availableItemsSameID =
    FILTER (
        ALL ( 'Table' ),
        'Table'[Item ID] = currentItemID
            &amp;amp;&amp;amp; 'Table'[Status] = "available"
    )
RETURN
    IF (
        COUNTROWS ( availableItemsSameID ) &amp;gt; 1
            &amp;amp;&amp;amp; CALCULATE ( MIN ( 'Table'[Quantity] ), availableItemsSameID ) = currentQuantity
            &amp;amp;&amp;amp; CALCULATE ( MAX ( 'Table'[Quantity] ), availableItemsSameID ) = currentQuantity,
        "Yes",
        "No"
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Please refer the attached .pbix file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Community Support Team_Binbin Yu&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;, then please consider&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Feb 2024 02:50:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-02-27T02:50:38Z</dc:date>
    <item>
      <title>Check if quantity equals in rows with same id</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Check-if-quantity-equals-in-rows-with-same-id/m-p/3721716#M33037</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;im currenty using report server and i have this table:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Item ID&lt;/TD&gt;&lt;TD&gt;Quantity&lt;/TD&gt;&lt;TD&gt;Status&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;available&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;available&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;Issue&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;invalid&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;I would like to add a column which can identify if quantity is equals when its same "Item ID" AND checks if Status is "Available".&lt;/P&gt;&lt;P&gt;Earlier Function didnt work cause the table doesnt has logical order for this function.&lt;/P&gt;&lt;P&gt;Thank in Advanced&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Feb 2024 11:02:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Check-if-quantity-equals-in-rows-with-same-id/m-p/3721716#M33037</guid>
      <dc:creator>dshmulenson</dc:creator>
      <dc:date>2024-02-25T11:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: Check if quantity equals in rows with same id</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Check-if-quantity-equals-in-rows-with-same-id/m-p/3722055#M33042</link>
      <description>&lt;P&gt;You should be able to group across these three columns and then return all the groups where the rowcount is greater than 1.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Feb 2024 16:27:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Check-if-quantity-equals-in-rows-with-same-id/m-p/3722055#M33042</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-02-25T16:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: Check if quantity equals in rows with same id</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Check-if-quantity-equals-in-rows-with-same-id/m-p/3725643#M33112</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="398331" data-lia-user-login="dshmulenson" class="lia-mention lia-mention-user"&gt;dshmulenson&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please try below steps:&lt;/P&gt;
&lt;P&gt;1. below is my test table&lt;/P&gt;
&lt;P&gt;Table:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;2. create a new column with below dax formula&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;IsQuantityEqualForAvailableStatus =
VAR currentItemID = 'Table'[Item ID]
VAR currentQuantity = 'Table'[Quantity]
VAR availableItemsSameID =
    FILTER (
        ALL ( 'Table' ),
        'Table'[Item ID] = currentItemID
            &amp;amp;&amp;amp; 'Table'[Status] = "available"
    )
RETURN
    IF (
        COUNTROWS ( availableItemsSameID ) &amp;gt; 1
            &amp;amp;&amp;amp; CALCULATE ( MIN ( 'Table'[Quantity] ), availableItemsSameID ) = currentQuantity
            &amp;amp;&amp;amp; CALCULATE ( MAX ( 'Table'[Quantity] ), availableItemsSameID ) = currentQuantity,
        "Yes",
        "No"
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Please refer the attached .pbix file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Community Support Team_Binbin Yu&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;, then please consider&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 02:50:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Check-if-quantity-equals-in-rows-with-same-id/m-p/3725643#M33112</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-27T02:50:38Z</dc:date>
    </item>
  </channel>
</rss>

