<?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: Condition Help in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Condition-Help/m-p/4230823#M167333</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="820871" data-lia-user-login="AkashDesai" class="lia-mention lia-mention-user"&gt;AkashDesai&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can create a calculated column to sum the "Piece Count" where the "Tag No" is the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;TotalPieceCountByTagNo = &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;CALCULATE(&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;SUM(TableName[Piece Count]),ALLEXCEPT(TableName, TableName[Tag No]))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next, you can create a measure to count distinct "Tag No" where the total "Piece Count" differs from the "Std Pc Count".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This measure filters the rows where the total piece count for a "Tag No" does not match the "Std Pc Count" and then performs a distinct count of those "Tag No" values&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;DistinctCountOfTagNo =&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;CALCULATE(&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;DISTINCTCOUNT(TableName[Tag No]),&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;FILTER(&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;TableName,TableName[TotalPieceCountByTagNo] &amp;lt;&amp;gt; TableName[Std Pc Count]))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;U&gt;&lt;STRONG&gt;If you find this helpful , please mark it as solution which will be helpful for others and Your Kudos/Likes &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt; are much appreciated!&lt;/STRONG&gt;&lt;/U&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;&lt;P&gt;Dharmendar S&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.linkedin.com/in/dharmendar-s-b5b43463/" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;LinkedIN&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 06 Oct 2024 18:53:14 GMT</pubDate>
    <dc:creator>dharmendars007</dc:creator>
    <dc:date>2024-10-06T18:53:14Z</dc:date>
    <item>
      <title>Condition Help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Condition-Help/m-p/4230717#M167327</link>
      <description>&lt;P&gt;I have a table shown below. What I want to do is sum the "Piece Count" column values only if values in "Tag No" column are equal.&lt;BR /&gt;Afterwards, I want to distinct count number of&amp;nbsp; Tag No (Rows) where Std Pc Count and Piece Count are not equal. Please help.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Oct 2024 14:51:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Condition-Help/m-p/4230717#M167327</guid>
      <dc:creator>AkashDesai</dc:creator>
      <dc:date>2024-10-06T14:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: Condition Help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Condition-Help/m-p/4230792#M167332</link>
      <description>&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;&lt;BR /&gt;Do not include sensitive information. Do not include anything that is unrelated to the issue or question. &lt;BR /&gt;&lt;BR /&gt;Need help uploading data? &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Oct 2024 17:22:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Condition-Help/m-p/4230792#M167332</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-10-06T17:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: Condition Help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Condition-Help/m-p/4230823#M167333</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="820871" data-lia-user-login="AkashDesai" class="lia-mention lia-mention-user"&gt;AkashDesai&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can create a calculated column to sum the "Piece Count" where the "Tag No" is the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;TotalPieceCountByTagNo = &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;CALCULATE(&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;SUM(TableName[Piece Count]),ALLEXCEPT(TableName, TableName[Tag No]))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next, you can create a measure to count distinct "Tag No" where the total "Piece Count" differs from the "Std Pc Count".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This measure filters the rows where the total piece count for a "Tag No" does not match the "Std Pc Count" and then performs a distinct count of those "Tag No" values&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;DistinctCountOfTagNo =&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;CALCULATE(&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;DISTINCTCOUNT(TableName[Tag No]),&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;FILTER(&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;TableName,TableName[TotalPieceCountByTagNo] &amp;lt;&amp;gt; TableName[Std Pc Count]))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;U&gt;&lt;STRONG&gt;If you find this helpful , please mark it as solution which will be helpful for others and Your Kudos/Likes &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt; are much appreciated!&lt;/STRONG&gt;&lt;/U&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;&lt;P&gt;Dharmendar S&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.linkedin.com/in/dharmendar-s-b5b43463/" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;LinkedIN&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Oct 2024 18:53:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Condition-Help/m-p/4230823#M167333</guid>
      <dc:creator>dharmendars007</dc:creator>
      <dc:date>2024-10-06T18:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Condition Help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Condition-Help/m-p/4230862#M167335</link>
      <description>&lt;P&gt;Dharmendra, thanks for your help. Your answer helped me to get better at syntax and solved my problem partially. Although I have one more catch which I came across just now. See the following example where I have same tag no being duplicated twice. So, before I use your first measure, I need to get rid of this duplication in such a way that I still count it once. How will that be possible? In this case, piece count is matching with std pc count so it's a right entry but need to consider it only once.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Oct 2024 21:18:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Condition-Help/m-p/4230862#M167335</guid>
      <dc:creator>AkashDesai</dc:creator>
      <dc:date>2024-10-06T21:18:22Z</dc:date>
    </item>
  </channel>
</rss>

