<?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 Fix subtotal and total measure evaluated in differente levels of Hierarchy in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fix-subtotal-and-total-measure-evaluated-in-differente-levels-of/m-p/2201936#M51700</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good morning&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would really appreciate your help with this request:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Context:&lt;/P&gt;&lt;P&gt;I currently have a matrix within 3 levels in the rows and some measures&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rows :&lt;/P&gt;&lt;P&gt;Bank name (Category 1)&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Account Type (Category 2)&lt;/P&gt;&lt;P&gt;Account Name ( Catgory 3)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I need is to create a measure who evaluates the account type taking into account there are 2 options, and return an specific calculation different for each one. This last request i just solved it using Measure 1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I try to get the subtotals for Category 1 and&amp;nbsp; the grand total, i just have not figured out how, because it must be sum of the results of evaluating the type of account,&amp;nbsp; I mean the sum of the subtotals I got from Category 2&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table : Account Type&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;cod&lt;/TD&gt;&lt;TD&gt;name&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;COR&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;AHO&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN&gt;For identify wich type an account is, I used the code&amp;nbsp; from the table above&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Measure 1 :&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;COR&lt;/SPAN&gt;&lt;SPAN&gt;= &lt;/SPAN&gt;&lt;SPAN&gt;[Measure23]&lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;[Measure44]&lt;/SPAN&gt;&lt;SPAN&gt;+&lt;/SPAN&gt;&lt;SPAN&gt;[Measure45]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;AHO&lt;/SPAN&gt;&lt;SPAN&gt;= &lt;/SPAN&gt;&lt;SPAN&gt;[Measure22]&lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;[Measure44]&lt;/SPAN&gt;&lt;SPAN&gt;+&lt;/SPAN&gt;&lt;SPAN&gt;[Measure45]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&amp;nbsp;AT&amp;nbsp;&lt;SPAN&gt;= &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(Account_Type_code&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SWITCH&lt;/SPAN&gt;&lt;SPAN&gt; ( Account_Type&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;COR&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;AHO&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;3&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;""&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Here I need to get the right value that would be&amp;nbsp; the sum of 26.498.449.893+7.430.738.545.94 , this per category and grand total.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 22 Nov 2021 16:21:59 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-11-22T16:21:59Z</dc:date>
    <item>
      <title>Fix subtotal and total measure evaluated in differente levels of Hierarchy</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fix-subtotal-and-total-measure-evaluated-in-differente-levels-of/m-p/2201936#M51700</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good morning&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would really appreciate your help with this request:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Context:&lt;/P&gt;&lt;P&gt;I currently have a matrix within 3 levels in the rows and some measures&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rows :&lt;/P&gt;&lt;P&gt;Bank name (Category 1)&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Account Type (Category 2)&lt;/P&gt;&lt;P&gt;Account Name ( Catgory 3)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I need is to create a measure who evaluates the account type taking into account there are 2 options, and return an specific calculation different for each one. This last request i just solved it using Measure 1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I try to get the subtotals for Category 1 and&amp;nbsp; the grand total, i just have not figured out how, because it must be sum of the results of evaluating the type of account,&amp;nbsp; I mean the sum of the subtotals I got from Category 2&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table : Account Type&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;cod&lt;/TD&gt;&lt;TD&gt;name&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;COR&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;AHO&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN&gt;For identify wich type an account is, I used the code&amp;nbsp; from the table above&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Measure 1 :&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;COR&lt;/SPAN&gt;&lt;SPAN&gt;= &lt;/SPAN&gt;&lt;SPAN&gt;[Measure23]&lt;/SPAN&gt;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lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Here I need to get the right value that would be&amp;nbsp; the sum of 26.498.449.893+7.430.738.545.94 , this per category and grand total.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 16:21:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fix-subtotal-and-total-measure-evaluated-in-differente-levels-of/m-p/2201936#M51700</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-22T16:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: Fix subtotal and total measure evaluated in differente levels of Hierarchy</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fix-subtotal-and-total-measure-evaluated-in-differente-levels-of/m-p/2202903#M51739</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , I think you need to use isinscope for that &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if(isinscope (Table[Account Type]), [Measure1], [Measure2])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://xxlbi.com/blog/new-dax-function-isinscope/" target="_blank"&gt;https://xxlbi.com/blog/new-dax-function-isinscope/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 05:55:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fix-subtotal-and-total-measure-evaluated-in-differente-levels-of/m-p/2202903#M51739</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-11-23T05:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: Fix subtotal and total measure evaluated in differente levels of Hierarchy</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fix-subtotal-and-total-measure-evaluated-in-differente-levels-of/m-p/2203709#M51777</link>
      <description>&lt;P&gt;Morning,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your answer, isinscope coulw work too, but that part is already working in my modelo. the one I need is for the subtotal per category 1 that should return the result of evaluating the measure 1 +&amp;nbsp; result of evaluating the measure 2.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 13:01:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fix-subtotal-and-total-measure-evaluated-in-differente-levels-of/m-p/2203709#M51777</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-23T13:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Fix subtotal and total measure evaluated in differente levels of Hierarchy</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fix-subtotal-and-total-measure-evaluated-in-differente-levels-of/m-p/2212035#M52219</link>
      <description>&lt;P&gt;At the end, I use SUMMARIZE for creating a virtual table, within a new column where the condition were applied, the use SUMX in order to get the value I needed .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 13:03:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fix-subtotal-and-total-measure-evaluated-in-differente-levels-of/m-p/2212035#M52219</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-29T13:03:55Z</dc:date>
    </item>
  </channel>
</rss>

