<?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: SUM on 2 columns ignore the third but filter third in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-on-2-columns-ignore-the-third-but-filter-third/m-p/2462187#M66705</link>
    <description>&lt;P&gt;I have 100's of names so tis is not feasible.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Apr 2022 20:36:42 GMT</pubDate>
    <dc:creator>sun-sboyanapall</dc:creator>
    <dc:date>2022-04-18T20:36:42Z</dc:date>
    <item>
      <title>SUM on 2 columns ignore the third but filter third</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-on-2-columns-ignore-the-third-but-filter-third/m-p/2462159#M66702</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This might be a silly question, but having issues to implement this in a measure.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table with 4 columns&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Name&lt;/TD&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;TD&gt;Type&lt;/TD&gt;&lt;TD&gt;Metric&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;12/1/2020&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;A&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;12/1/2020&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;B&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;12/1/2020&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;C&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;12/1/2020&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;12/1/2020&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;A&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;12/1/2020&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;B&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;12/1/2020&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;7&lt;/P&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;Here I want to sum(Metric) but ignore Type from it&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Result is something like Sum(Metric) = 13, Average(Metric) = 13, Median(Metric) = 13 &lt;STRONG&gt;for Name A&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I follow the traditional approach the sum is still 13 but my average and median are screwed by it. I can just do&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SUMMARIZE(Name, Date, Metric, SUM(Metric)) but the issue is I want to filter the data by &lt;STRONG&gt;Type.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so, If I filter by type A and B Result is something like Sum(Metric) = 6, Average(Metric) = 6, Median(Metric) = 6 &lt;STRONG&gt;for Name A&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2022 20:06:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-on-2-columns-ignore-the-third-but-filter-third/m-p/2462159#M66702</guid>
      <dc:creator>sun-sboyanapall</dc:creator>
      <dc:date>2022-04-18T20:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: SUM on 2 columns ignore the third but filter third</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-on-2-columns-ignore-the-third-but-filter-third/m-p/2462177#M66703</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;Can you just use this type of measure?&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Name A Sum = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table'[Metric]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;'Table'[Name]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"A"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Name A Avg = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;AVERAGE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table'[Metric]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;'Table'[Name]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"A"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;You could set up two dimension tables for this data table, to help with filtering.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Table Name&amp;nbsp; Name = A &amp;amp; B&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Table Name Type = A,B, C&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I hope this is what you are asking about..&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 18 Apr 2022 20:30:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-on-2-columns-ignore-the-third-but-filter-third/m-p/2462177#M66703</guid>
      <dc:creator>Whitewater100</dc:creator>
      <dc:date>2022-04-18T20:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: SUM on 2 columns ignore the third but filter third</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-on-2-columns-ignore-the-third-but-filter-third/m-p/2462187#M66705</link>
      <description>&lt;P&gt;I have 100's of names so tis is not feasible.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2022 20:36:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-on-2-columns-ignore-the-third-but-filter-third/m-p/2462187#M66705</guid>
      <dc:creator>sun-sboyanapall</dc:creator>
      <dc:date>2022-04-18T20:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: SUM on 2 columns ignore the third but filter third</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-on-2-columns-ignore-the-third-but-filter-third/m-p/2462545#M66733</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="352282" data-lia-user-login="sun-sboyanapall" class="lia-mention lia-mention-user"&gt;sun-sboyanapall&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;would you please help explain further what is point of having the sum, average and median all having the same value? If so just use the sum for the three measure only change the name. But what's the point?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 05:00:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-on-2-columns-ignore-the-third-but-filter-third/m-p/2462545#M66733</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-04-19T05:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: SUM on 2 columns ignore the third but filter third</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-on-2-columns-ignore-the-third-but-filter-third/m-p/2463847#M66848</link>
      <description>&lt;P&gt;Hello Tamerj,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sure, A&amp;nbsp; Name can have different&amp;nbsp; dates. In that case the average will be average grouped by date and Median will be median by Date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&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;Name&lt;/TD&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;TD&gt;Type&lt;/TD&gt;&lt;TD&gt;Metric&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;11/1/2021&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;11/1/2021&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;11/1/2021&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;11/5/2021&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;12/6/2021&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case Sum is 8, Average is 2.66, Median is 3.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that helps.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 14:53:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-on-2-columns-ignore-the-third-but-filter-third/m-p/2463847#M66848</guid>
      <dc:creator>sun-sboyanapall</dc:creator>
      <dc:date>2022-04-19T14:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: SUM on 2 columns ignore the third but filter third</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-on-2-columns-ignore-the-third-but-filter-third/m-p/2464768#M66942</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="352282" data-lia-user-login="sun-sboyanapall" class="lia-mention lia-mention-user"&gt;sun-sboyanapall&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I'm sorry but this is getting me even more confused. In the original post you mentioned:&lt;BR /&gt;"&lt;EM&gt;Result is something like Sum(Metric) = 13, Average(Metric) = 13, Median(Metric) = 13&amp;nbsp;&lt;/EM&gt;&lt;STRONG&gt;&lt;EM&gt;for Name A&lt;/EM&gt;&lt;/STRONG&gt;"&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;"&lt;SPAN&gt;so, If I filter by type A and B Result is something like Sum(Metric) = 6, Average(Metric) = 6, Median(Metric) = 6&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;for Name A&lt;/STRONG&gt;"&lt;BR /&gt;Please provide more details and provide a sample of expected results in the expected visual (table, chart, matrix, card, etc..)?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 05:00:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-on-2-columns-ignore-the-third-but-filter-third/m-p/2464768#M66942</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-04-20T05:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: SUM on 2 columns ignore the third but filter third</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-on-2-columns-ignore-the-third-but-filter-third/m-p/2468080#M67102</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="352282" data-lia-user-login="sun-sboyanapall" class="lia-mention lia-mention-user"&gt;sun-sboyanapall&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I created a sample pbix file(&lt;STRONG&gt;see attachment&lt;/STRONG&gt;) for you, please check whether that is what you want.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;1. Create a &lt;STRONG&gt;measure&lt;/STRONG&gt; as below to get Sum(Metric)&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sum(Metric) = CALCULATE ( SUM ( 'Table'[Metric] ), ALLEXCEPT ( 'Table', 'Table'[Name] ) )&lt;/LI-CODE&gt;
&lt;P&gt;2. Create a &lt;STRONG&gt;measure&lt;/STRONG&gt; as below to get Average(Metric)&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Average(Metric) =
CALCULATE (
    DIVIDE ( [Sum(Metric)], CALCULATE ( DISTINCTCOUNT ( 'Table'[Date] ) ) ),
    ALLEXCEPT ( 'Table', 'Table'[Name] )
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;For Median(Metric), I'm not sure what's the correct calculation logic... Could you please provide me the calculation logic of&amp;nbsp;Median(Metric)? Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the above one can't help you get the desired result, please provide some &lt;STRONG&gt;sample data&lt;/STRONG&gt; in your tables (&lt;STRONG&gt;&lt;EM&gt;exclude &lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;sensitive &lt;/STRONG&gt;&lt;/EM&gt;&lt;STRONG&gt;&lt;EM&gt;data&lt;/EM&gt;&lt;/STRONG&gt;) with &lt;STRONG&gt;Text&lt;/STRONG&gt; format and your &lt;STRONG&gt;expected result&lt;/STRONG&gt; with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FDesktop%2FHow-to-upload-PBI-in-Community%2Fm-p%2F1672886&amp;amp;data=04%7C01%7Cv-yiruan%40microsoft.com%7C4f580813734d4a8355b008da16f6e91a%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637847547341062885%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;amp;sdata=YJvujige2YITXKbKED9JieQm5LBdf%2F3IYPM4ggdiijQ%3D&amp;amp;reserved=0" target="_blank"&gt;How to upload PBI in Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2022 06:33:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-on-2-columns-ignore-the-third-but-filter-third/m-p/2468080#M67102</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-21T06:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: SUM on 2 columns ignore the third but filter third</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-on-2-columns-ignore-the-third-but-filter-third/m-p/2469809#M67214</link>
      <description>&lt;P&gt;Thank You This worked,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I made an adjustment to the formula since I wanted Date to also affect the Sum &amp;amp; average along with Name.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum(Metric) = CALCULATE ( SUM ( 'Table'[Metric] ),  ALLEXCEPT ( 'Table', 'Table'[Name],'Table'[Date] ) )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Average(Metric) = 
CALCULATE (
    DIVIDE ( [Sum(Metric)], CALCULATE ( DISTINCTCOUNT ( 'Table'[Date] ) ) ),
    ALLEXCEPT ( 'Table', 'Table'[Name],'Table'[Date] )
)&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&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;</description>
      <pubDate>Thu, 21 Apr 2022 18:38:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-on-2-columns-ignore-the-third-but-filter-third/m-p/2469809#M67214</guid>
      <dc:creator>sun-sboyanapall</dc:creator>
      <dc:date>2022-04-21T18:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: SUM on 2 columns ignore the third but filter third</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-on-2-columns-ignore-the-third-but-filter-third/m-p/2469811#M67216</link>
      <description>&lt;P&gt;Sorry, I must have confused you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So SUM will still be 8 but the average when grouped by Name and Date will be average of&amp;nbsp; (4, 3, 1) Which is 2.66 and Median will be median of (4, 3, 1) which is 3.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that helped!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2022 18:42:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SUM-on-2-columns-ignore-the-third-but-filter-third/m-p/2469811#M67216</guid>
      <dc:creator>sun-sboyanapall</dc:creator>
      <dc:date>2022-04-21T18:42:46Z</dc:date>
    </item>
  </channel>
</rss>

