<?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 How do I create a measure to calculate column totals based on filters from other columns in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-create-a-measure-to-calculate-column-totals-based-on/m-p/2995334#M100919</link>
    <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am still new to Power BI but slowly learning! I am used to MS Excel functions but creating &lt;STRONG&gt;MEASURES&lt;/STRONG&gt; are completely new to me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As described in the subject, my goal is to create a measure that totals the monthly employment (shown below) by filtering three other columns as shown below:&amp;nbsp;&lt;/P&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;I have barely used measures before and I am a little stuck! Any help is greatly appreciated!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 30 Dec 2022 21:45:02 GMT</pubDate>
    <dc:creator>HCC</dc:creator>
    <dc:date>2022-12-30T21:45:02Z</dc:date>
    <item>
      <title>How do I create a measure to calculate column totals based on filters from other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-create-a-measure-to-calculate-column-totals-based-on/m-p/2995334#M100919</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am still new to Power BI but slowly learning! I am used to MS Excel functions but creating &lt;STRONG&gt;MEASURES&lt;/STRONG&gt; are completely new to me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As described in the subject, my goal is to create a measure that totals the monthly employment (shown below) by filtering three other columns as shown below:&amp;nbsp;&lt;/P&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;I have barely used measures before and I am a little stuck! Any help is greatly appreciated!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2022 21:45:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-create-a-measure-to-calculate-column-totals-based-on/m-p/2995334#M100919</guid>
      <dc:creator>HCC</dc:creator>
      <dc:date>2022-12-30T21:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a measure to calculate column totals based on filters from other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-create-a-measure-to-calculate-column-totals-based-on/m-p/2995431#M100924</link>
      <description>&lt;P&gt;Hi HHC,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suggest using CALCULATE filter arguments to achieve this goal, it's a bit long but the sqlbi article &lt;A href="https://www.sqlbi.com/articles/filter-arguments-in-calculate/" target="_self"&gt;here&lt;/A&gt; is a good read.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's a basic measure using static filters. Apologies for the lack of formatting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[Sum of month1_emplvl ignoring a specific industry_code and area_fips] =&lt;BR /&gt;CALCULATE (&lt;BR /&gt;SUM('Sample Data'[month1_emplvl]),&lt;BR /&gt;'Sample Data'[industry_code] &amp;lt;&amp;gt; 111100,&lt;BR /&gt;'Sample Data'[area_fips] &amp;lt;&amp;gt; "C2683"&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you needed to get something like the sum of month1_emplvl with the same area_fips and Year &amp;amp; Quarter columns (regardless of industry_code), here's how you could do a count over all rows with the same values except a couple you want to filter out, and ignoring any differences in one of the columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[Sum of month1_emplvl except for 2022-Q1 and C2683] =&lt;BR /&gt;CALCULATE (&lt;BR /&gt;SUM('Sample Data'[month1_emplvl])&lt;BR /&gt;, REMOVEFILTERS('Sample Data'[industry_code])&lt;BR /&gt;, 'Sample Data'[Year &amp;amp; Quarter] &amp;lt;&amp;gt; "2022-Q1"&lt;BR /&gt;, 'Sample Data'[area_fips] &amp;lt;&amp;gt; "C2683"&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I've missed your intention, it could be helpful to have an example of how you'd filter and total using your above dataset in pseudocode or using Excel.&lt;/P&gt;</description>
      <pubDate>Sat, 31 Dec 2022 00:57:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-create-a-measure-to-calculate-column-totals-based-on/m-p/2995431#M100924</guid>
      <dc:creator>andrewpirie</dc:creator>
      <dc:date>2022-12-31T00:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a measure to calculate column totals based on filters from other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-create-a-measure-to-calculate-column-totals-based-on/m-p/2995597#M100934</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="479939" data-lia-user-login="HCC" class="lia-mention lia-mention-user"&gt;HCC&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;how does your visual look like?&lt;/P&gt;</description>
      <pubDate>Sat, 31 Dec 2022 10:40:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-create-a-measure-to-calculate-column-totals-based-on/m-p/2995597#M100934</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-12-31T10:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a measure to calculate column totals based on filters from other columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-create-a-measure-to-calculate-column-totals-based-on/m-p/2996289#M100983</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="479939" data-lia-user-login="HCC" class="lia-mention lia-mention-user"&gt;HCC&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use sumx()&amp;nbsp;&lt;/P&gt;
&lt;P&gt;e.g sumx(filter(table,your expression),[month1_emplvl])&lt;/P&gt;
&lt;P&gt;if the sample above cannot meet your requirement, can you provide more detail condition?&lt;/P&gt;
&lt;P&gt;Best Regards!&lt;/P&gt;
&lt;P&gt;Yolo Zhu&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps, then please consider&amp;nbsp;Accept it as the solution&amp;nbsp;to help the other members find it more quickly.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jan 2023 05:54:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-create-a-measure-to-calculate-column-totals-based-on/m-p/2996289#M100983</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-02T05:54:28Z</dc:date>
    </item>
  </channel>
</rss>

