<?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: Calculate All rows related to other column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-rows-related-to-other-column/m-p/1736773#M36053</link>
    <description>&lt;P&gt;Hi, Its not clear what the question is. Can you rephrase?&lt;/P&gt;
&lt;P&gt;btw measure was not updated yet:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure2 = SUMX(SUMMARIZE('Table','Table'[Customer],'Table'[Class]), if    (CALCULATE(DISTINCTCOUNT('Table'[Y/N?]), ALL('Table'[Class])) = 2,CALCULATE(SUM('Table'[Amount])),BLANK()))&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 22 Mar 2021 12:44:04 GMT</pubDate>
    <dc:creator>stevedep</dc:creator>
    <dc:date>2021-03-22T12:44:04Z</dc:date>
    <item>
      <title>Calculate All rows related to other column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-rows-related-to-other-column/m-p/1732863#M35933</link>
      <description>&lt;P&gt;Hi, Thank you in advance for helping me measure for the below sample data.&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;OrderID&lt;/TD&gt;&lt;TD&gt;Customer&lt;/TD&gt;&lt;TD&gt;Y/N?&lt;/TD&gt;&lt;TD&gt;Class&lt;/TD&gt;&lt;TD&gt;Amount&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;111&lt;/TD&gt;&lt;TD&gt;ABC&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;Apple&lt;/TD&gt;&lt;TD&gt;100&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lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;Mango&lt;/TD&gt;&lt;TD&gt;440&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;113&lt;/TD&gt;&lt;TD&gt;EPM&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;Mango&lt;/TD&gt;&lt;TD&gt;550&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;114&lt;/TD&gt;&lt;TD&gt;YRP&lt;/TD&gt;&lt;TD&gt;N&lt;/TD&gt;&lt;TD&gt;Apple&lt;/TD&gt;&lt;TD&gt;330&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;115&lt;/TD&gt;&lt;TD&gt;PS&lt;/TD&gt;&lt;TD&gt;N&lt;/TD&gt;&lt;TD&gt;Mango&lt;/TD&gt;&lt;TD&gt;348&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;119&lt;/TD&gt;&lt;TD&gt;ABC&lt;/TD&gt;&lt;TD&gt;N&lt;/TD&gt;&lt;TD&gt;Mango&lt;/TD&gt;&lt;TD&gt;546&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;120&lt;/TD&gt;&lt;TD&gt;EPM&lt;/TD&gt;&lt;TD&gt;N&lt;/TD&gt;&lt;TD&gt;Mango&lt;/TD&gt;&lt;TD&gt;550&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;121&lt;/TD&gt;&lt;TD&gt;YRP&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;Orange&lt;/TD&gt;&lt;TD&gt;332&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;I tried myself to get the measure in many ways, somehow I am not able to figure it out, please help me. I am able to arrive&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;1. the count of customers, who has "Y and N" = 3 (ABC, EPM, YRP)&lt;/P&gt;&lt;P&gt;2. the total count of orders for them is 6 (111,113,114,119,120 &amp;amp; 121)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;But the requirement here is to calculate the count of rows and sum of Amounts for the "Class" from the table for the above mentioned 1 &amp;amp; 2.&amp;nbsp;Expected results are as follows:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Mar 2021 12:45:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-rows-related-to-other-column/m-p/1732863#M35933</guid>
      <dc:creator>ManjunathaEP</dc:creator>
      <dc:date>2021-03-19T12:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate All rows related to other column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-rows-related-to-other-column/m-p/1733671#M35966</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Here you are:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = SUMX(VALUES('Table'[Customer]), if    (CALCULATE(DISTINCTCOUNT('Table'[Y/N?]), ALL('Table'[Class])) = 2,CALCULATE(DISTINCTCOUNT('Table'[OrderID])),BLANK()))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;File is attached.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards, Steve.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Mar 2021 20:31:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-rows-related-to-other-column/m-p/1733671#M35966</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2021-03-19T20:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate All rows related to other column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-rows-related-to-other-column/m-p/1733980#M35973</link>
      <description>&lt;P&gt;Thank you, it is really helpful. However, my row counts are not matching to the total. Is possible to match the Totals with row count?&amp;nbsp; Also, I have noticed that there is a gap after "if" in the given measure, May I know the reason and how it works?&lt;/P&gt;</description>
      <pubDate>Sat, 20 Mar 2021 06:01:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-rows-related-to-other-column/m-p/1733980#M35973</guid>
      <dc:creator>ManjunathaEP</dc:creator>
      <dc:date>2021-03-20T06:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate All rows related to other column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-rows-related-to-other-column/m-p/1734037#M35974</link>
      <description>&lt;P&gt;Can you send a screenshot or a (partial) file via PM? Difficult to help with your description of the issue alone.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Mar 2021 07:55:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-rows-related-to-other-column/m-p/1734037#M35974</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2021-03-20T07:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate All rows related to other column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-rows-related-to-other-column/m-p/1734057#M35975</link>
      <description>&lt;P&gt;Thank you for your quick response, I fetched down the screenshot after applying the given measure in the original data. Columns are the types of "Class" in the sample data. Row total (506) is not matching with the Grand Total(474).&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Also, I would like to get a measure for the below:&lt;/P&gt;&lt;P&gt;I calculated the count orders for Class column with your given measure, where [Y/N?] is equal to Y and N and I got the answer as below&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Now, I would like to get the orders count from the above measure, where [Y/N?] is equal to "Y" only as like below:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for supporting me on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Mar 2021 08:14:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-rows-related-to-other-column/m-p/1734057#M35975</guid>
      <dc:creator>ManjunathaEP</dc:creator>
      <dc:date>2021-03-20T08:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate All rows related to other column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-rows-related-to-other-column/m-p/1734069#M35978</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;
&lt;P&gt;then it should be:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = SUMX(SUMMARIZE('Table','Table'[Customer],'Table'[Class]), if    (CALCULATE(DISTINCTCOUNT('Table'[Y/N?]), ALL('Table'[Y/N?]), ALL('Table'[Class])) = 2,CALCULATE(DISTINCTCOUNT('Table'[OrderID])),BLANK()))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;see attached.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;kr, steve.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Mar 2021 08:25:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-rows-related-to-other-column/m-p/1734069#M35978</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2021-03-20T08:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate All rows related to other column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-rows-related-to-other-column/m-p/1736408#M36046</link>
      <description>&lt;P&gt;Hi, With reference to the previous measures and sample data, can we create a measure instead of selecting from the filter option as earlier. I mean, below mentioned results are expected from measure instead of selecting from the filter. I tried to get the same results without filter, but I failed to do so&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 10:22:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-rows-related-to-other-column/m-p/1736408#M36046</guid>
      <dc:creator>ManjunathaEP</dc:creator>
      <dc:date>2021-03-22T10:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate All rows related to other column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-rows-related-to-other-column/m-p/1736773#M36053</link>
      <description>&lt;P&gt;Hi, Its not clear what the question is. Can you rephrase?&lt;/P&gt;
&lt;P&gt;btw measure was not updated yet:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure2 = SUMX(SUMMARIZE('Table','Table'[Customer],'Table'[Class]), if    (CALCULATE(DISTINCTCOUNT('Table'[Y/N?]), ALL('Table'[Class])) = 2,CALCULATE(SUM('Table'[Amount])),BLANK()))&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 22 Mar 2021 12:44:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-rows-related-to-other-column/m-p/1736773#M36053</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2021-03-22T12:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate All rows related to other column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-rows-related-to-other-column/m-p/1736959#M36056</link>
      <description>&lt;P&gt;Hi Steve, Thank you for your support.&lt;/P&gt;&lt;P&gt;I am able to get the solution with the earlier messages and it is working fine with the filter option. When I needed the selective results from the column of [Y/N?] like "N" only, I added the field [Y/N?] to the filters and it is working fine.&lt;/P&gt;&lt;P&gt;But, I want to get the new(direct) measure for the same results without selecting "N" from the filter option.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thank you again!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 13:55:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-rows-related-to-other-column/m-p/1736959#M36056</guid>
      <dc:creator>ManjunathaEP</dc:creator>
      <dc:date>2021-03-22T13:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate All rows related to other column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-rows-related-to-other-column/m-p/1737242#M36058</link>
      <description>&lt;P&gt;I gues this is what you are looking for:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
CALCULATE(
SUMX(SUMMARIZE('Table','Table'[Customer],'Table'[Class]), if    (CALCULATE(DISTINCTCOUNT('Table'[Y/N?]), ALL('Table'[Y/N?]), ALL('Table'[Class])) = 2,CALCULATE(DISTINCTCOUNT('Table'[OrderID])),BLANK())), 'Table'[Y/N?]="N")&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 22 Mar 2021 15:46:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-All-rows-related-to-other-column/m-p/1737242#M36058</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2021-03-22T15:46:27Z</dc:date>
    </item>
  </channel>
</rss>

