<?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 Sum In One Measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-In-One-Measure/m-p/3155545#M113181</link>
    <description>&lt;P&gt;&lt;STRONG&gt;I have two variables and want to sum in one Measure.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;VAR Filter1 = { 196, 176, 137, 167, 171, 141, 160, 161 }&lt;BR /&gt;VAR Filter2 = { 145, 121 }&lt;BR /&gt;VAR FIlter3 = { 2065, 178, 138, 189, 148, 149, 190, 164, 2578, 2778, 2878, 194, 169 }&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;VAR Income =&lt;BR /&gt;CALCULATE (&lt;BR /&gt;[Income],&lt;BR /&gt;DATESMTD ( 'Date'[Date] ),&lt;BR /&gt;FILTER (&lt;BR /&gt;OrganizationDepartment_LookUP,&lt;BR /&gt;NOT ( OrganizationDepartment_LookUP[CODE] ) IN Filter1 &amp;amp;&amp;amp;&lt;BR /&gt;NOT ( OrganizationDepartment_LookUP[CODE] ) IN Filter2 &amp;amp;&amp;amp;&lt;BR /&gt;NOT ( OrganizationDepartment_LookUP[CODE] ) IN Filter3 ) )&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;VAR HoureTarget =&lt;BR /&gt;CALCULATE (&lt;BR /&gt;CALCULATE (&lt;BR /&gt;SUMX (&lt;BR /&gt;DoctorTarget,&lt;BR /&gt;DoctorTarget[TARGET] * CALCULATE ( [RealTime], DATESMTD ( 'Date'[Date] ) ) ),&lt;BR /&gt;FILTER (&lt;BR /&gt;OrganizationDepartment_LookUP,&lt;BR /&gt;NOT ( OrganizationDepartment_LookUP[CODE] ) IN Filter1 &amp;amp;&amp;amp;&lt;BR /&gt;NOT ( OrganizationDepartment_LookUP[CODE] ) IN Filter2 &amp;amp;&amp;amp;&lt;BR /&gt;NOT ( OrganizationDepartment_LookUP[CODE] ) IN Filter3)),&lt;BR /&gt;TREATAS (&lt;BR /&gt;SUMMARIZE ( 'Date', 'Date'[Year], 'Date'[Month Number] ),&lt;BR /&gt;DoctorTarget[YEAR],&lt;BR /&gt;DoctorTarget[MONTH] ) )&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;RETURN CALC4 = IF ( HoureTarget = BLANK(), Income, HoureTarget )&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My result is sum, but it is not correct. this tree values which is "result true" does not add at the department level:&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 27 Mar 2023 08:58:12 GMT</pubDate>
    <dc:creator>PowerMan1</dc:creator>
    <dc:date>2023-03-27T08:58:12Z</dc:date>
    <item>
      <title>Sum In One Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-In-One-Measure/m-p/3155545#M113181</link>
      <description>&lt;P&gt;&lt;STRONG&gt;I have two variables and want to sum in one Measure.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;VAR Filter1 = { 196, 176, 137, 167, 171, 141, 160, 161 }&lt;BR /&gt;VAR Filter2 = { 145, 121 }&lt;BR /&gt;VAR FIlter3 = { 2065, 178, 138, 189, 148, 149, 190, 164, 2578, 2778, 2878, 194, 169 }&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;VAR Income =&lt;BR /&gt;CALCULATE (&lt;BR /&gt;[Income],&lt;BR /&gt;DATESMTD ( 'Date'[Date] ),&lt;BR /&gt;FILTER (&lt;BR /&gt;OrganizationDepartment_LookUP,&lt;BR /&gt;NOT ( OrganizationDepartment_LookUP[CODE] ) IN Filter1 &amp;amp;&amp;amp;&lt;BR /&gt;NOT ( OrganizationDepartment_LookUP[CODE] ) IN Filter2 &amp;amp;&amp;amp;&lt;BR /&gt;NOT ( OrganizationDepartment_LookUP[CODE] ) IN Filter3 ) )&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;VAR HoureTarget =&lt;BR /&gt;CALCULATE (&lt;BR /&gt;CALCULATE (&lt;BR /&gt;SUMX (&lt;BR /&gt;DoctorTarget,&lt;BR /&gt;DoctorTarget[TARGET] * CALCULATE ( [RealTime], DATESMTD ( 'Date'[Date] ) ) ),&lt;BR /&gt;FILTER (&lt;BR /&gt;OrganizationDepartment_LookUP,&lt;BR /&gt;NOT ( OrganizationDepartment_LookUP[CODE] ) IN Filter1 &amp;amp;&amp;amp;&lt;BR /&gt;NOT ( OrganizationDepartment_LookUP[CODE] ) IN Filter2 &amp;amp;&amp;amp;&lt;BR /&gt;NOT ( OrganizationDepartment_LookUP[CODE] ) IN Filter3)),&lt;BR /&gt;TREATAS (&lt;BR /&gt;SUMMARIZE ( 'Date', 'Date'[Year], 'Date'[Month Number] ),&lt;BR /&gt;DoctorTarget[YEAR],&lt;BR /&gt;DoctorTarget[MONTH] ) )&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;RETURN CALC4 = IF ( HoureTarget = BLANK(), Income, HoureTarget )&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My result is sum, but it is not correct. this tree values which is "result true" does not add at the department level:&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 08:58:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-In-One-Measure/m-p/3155545#M113181</guid>
      <dc:creator>PowerMan1</dc:creator>
      <dc:date>2023-03-27T08:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Sum In One Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-In-One-Measure/m-p/3159736#M113430</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="526564" data-lia-user-login="PowerMan1" class="lia-mention lia-mention-user"&gt;PowerMan1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure if I understand your expected result correctly. Do you want to add up the total of all sub values and show it on the subtotal row? If so, you can try the following measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;measure2 = SUMX ( VALUES ( 'Table'[Code] ), [your original measure] )
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Jing&lt;BR /&gt;If this post helps, please Accept it as Solution to help other members find it.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 02:38:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-In-One-Measure/m-p/3159736#M113430</guid>
      <dc:creator>v-jingzhang</dc:creator>
      <dc:date>2023-03-29T02:38:23Z</dc:date>
    </item>
  </channel>
</rss>

