<?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: Cant get correct total on complex model in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167262#M113977</link>
    <description>&lt;P&gt;Not the best solution, but as an easy and fast solution to fix it, please try this as well. It should work for your total:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure =
VAR _TABLEE =
    ADDCOLUMNS (
        SUMMARIZE (
            GENERAL_ACCOUNT,
            GENERAL_ACCOUNT[BU],
            GENERAL_ACCOUNT[Link],
            GENERAL_ACCOUNT[ACCOUNTCODE]
        ),
        "@measure3", [measure3]
    )
RETURN
    SUMX ( _TABLEE, [@measure3] )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 01 Apr 2023 20:26:40 GMT</pubDate>
    <dc:creator>MohammadLoran25</dc:creator>
    <dc:date>2023-04-01T20:26:40Z</dc:date>
    <item>
      <title>Cant get correct total on complex model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3166821#M113921</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;I have a complex data model imported from Oracle database, I am attaching a drawing of how it looks like.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I made a measure on a fact table "General Account" that works fine. It is basically like this&lt;/P&gt;&lt;PRE&gt;Measure1 = 
SUMX(
    FILTER(GENERAL_ACCOUNT,
    LEFT(GENERAL_ACCOUNT[ACCOUNTCODE],5) = "21031"),
    (GENERAL_ACCOUNT[DEBITVALUE] - GENERAL_ACCOUNT[CREDITVALUE])
)&lt;/PRE&gt;&lt;P&gt;The problem comes when I want to aggregate only positive values of this measure and display it in a table/matrix using dimension tables columns that have some active and some inactive relationships&lt;/P&gt;&lt;P&gt;The SUMX I use in my attempt to filter only positive values works on line values but not on total&lt;/P&gt;&lt;P&gt;Here is the first I tried without filtering positive values, which returns correct line and total values&lt;/P&gt;&lt;PRE&gt;Measure2 = 
CALCULATE(
    SUMX(
        GENERAL_ACCOUNT,
        [Measure1]
    ),
    ALLSELECTED(GENERAL_ACCOUNT[DEPTID], GENERAL_ACCOUNT[CLIENTID], GENERAL_ACCOUNT[DOCDATE], GENERAL_ACCOUNT[DOCNO]),
    --acc
    USERELATIONSHIP(DimLink[LinkCode],ACCOUNTS[Link]),
    USERELATIONSHIP(DimBU[BUCode], ACCOUNTS[BU]),
    --dep
    USERELATIONSHIP(DimLink[LinkCode], DEPARTMENTS[Link]),
    USERELATIONSHIP(DimBU[BUCode], DEPARTMENTS[BU]),
    --sector
    USERELATIONSHIP(DimLink[LinkCode], SECTORS[Link]),
    USERELATIONSHIP(DimBU[BUCode], SECTORS[BU]),
    --general acc
    USERELATIONSHIP(DimLink[LinkCode], GENERAL_ACCOUNT[Link]),
    USERELATIONSHIP(DimBU[BUCode], GENERAL_ACCOUNT[BU])
)&lt;/PRE&gt;&lt;P&gt;And here is my attempt for filtering on positive values which failed on total line&lt;/P&gt;&lt;PRE&gt;Measure3 = 
var int_talbe = 
    ADDCOLUMNS(
    SUMMARIZE(GENERAL_ACCOUNT,
    GENERAL_ACCOUNT[BU],
    GENERAL_ACCOUNT[Link],
    GENERAL_ACCOUNT[ACCOUNTCODE]),
    "value",
CALCULATE(
    SUMX(
        GENERAL_ACCOUNT,
        [Measure1]
    ),
    ALLSELECTED(GENERAL_ACCOUNT[DEPTID], GENERAL_ACCOUNT[CLIENTID], GENERAL_ACCOUNT[DOCDATE], GENERAL_ACCOUNT[DOCNO]),
    --acc
    USERELATIONSHIP(DimLink[LinkCode],ACCOUNTS[Link]),
    USERELATIONSHIP(DimBU[BUCode], ACCOUNTS[BU]),
    --dep
    USERELATIONSHIP(DimLink[LinkCode], DEPARTMENTS[Link]),
    USERELATIONSHIP(DimBU[BUCode], DEPARTMENTS[BU]),
    --sector
    USERELATIONSHIP(DimLink[LinkCode], SECTORS[Link]),
    USERELATIONSHIP(DimBU[BUCode], SECTORS[BU]),
    --general acc
    USERELATIONSHIP(DimLink[LinkCode], GENERAL_ACCOUNT[Link]),
    USERELATIONSHIP(DimBU[BUCode], GENERAL_ACCOUNT[BU])
)
    )
return
SUMX(
    int_table,
    IF([value]&amp;lt;0,0,[value])
)&lt;/PRE&gt;&lt;P&gt;Here is how both measures behave&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help?&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 01 Apr 2023 01:45:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3166821#M113921</guid>
      <dc:creator>Mostafa-Hussien</dc:creator>
      <dc:date>2023-04-01T01:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get correct total on complex model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3166958#M113928</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="539969" data-lia-user-login="Mostafa-Hussien" class="lia-mention lia-mention-user"&gt;Mostafa-Hussien&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I think it is because of the ALLSELECTED function that you have in Measure3.&lt;/P&gt;&lt;P&gt;Please comment it and let me know the result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Loran&lt;/P&gt;</description>
      <pubDate>Sat, 01 Apr 2023 07:29:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3166958#M113928</guid>
      <dc:creator>MohammadLoran25</dc:creator>
      <dc:date>2023-04-01T07:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get correct total on complex model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3166998#M113929</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="539969" data-lia-user-login="Mostafa-Hussien" class="lia-mention lia-mention-user"&gt;Mostafa-Hussien&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please try&lt;/P&gt;
&lt;P&gt;Measure3 =&lt;BR /&gt;VAR SelectedDims =&lt;BR /&gt;ALLSELECTED (&lt;BR /&gt;GENERAL_ACCOUNT[DEPTID],&lt;BR /&gt;GENERAL_ACCOUNT[CLIENTID],&lt;BR /&gt;GENERAL_ACCOUNT[DOCDATE],&lt;BR /&gt;GENERAL_ACCOUNT[DOCNO]&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;SUMX (&lt;BR /&gt;SUMMARIZE (&lt;BR /&gt;GENERAL_ACCOUNT,&lt;BR /&gt;GENERAL_ACCOUNT[BU],&lt;BR /&gt;GENERAL_ACCOUNT[Link],&lt;BR /&gt;GENERAL_ACCOUNT[ACCOUNTCODE]&lt;BR /&gt;),&lt;BR /&gt;VAR Value1 =&lt;BR /&gt;CALCULATE (&lt;BR /&gt;SUMX ( GENERAL_ACCOUNT, [Measure1] ),&lt;BR /&gt;SelectedDims,&lt;BR /&gt;--acc&lt;BR /&gt;USERELATIONSHIP ( DimLink[LinkCode], ACCOUNTS[Link] ),&lt;BR /&gt;USERELATIONSHIP ( DimBU[BUCode], ACCOUNTS[BU] ),&lt;BR /&gt;--dep&lt;BR /&gt;USERELATIONSHIP ( DimLink[LinkCode], DEPARTMENTS[Link] ),&lt;BR /&gt;USERELATIONSHIP ( DimBU[BUCode], DEPARTMENTS[BU] ),&lt;BR /&gt;--sector&lt;BR /&gt;USERELATIONSHIP ( DimLink[LinkCode], SECTORS[Link] ),&lt;BR /&gt;USERELATIONSHIP ( DimBU[BUCode], SECTORS[BU] ),&lt;BR /&gt;--general acc&lt;BR /&gt;USERELATIONSHIP ( DimLink[LinkCode], GENERAL_ACCOUNT[Link] ),&lt;BR /&gt;USERELATIONSHIP ( DimBU[BUCode], GENERAL_ACCOUNT[BU] )&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;IF ( Value &amp;lt; 0, 0, Value1 )&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Sat, 01 Apr 2023 08:35:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3166998#M113929</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-04-01T08:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get correct total on complex model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167256#M113975</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reponse&lt;/P&gt;&lt;P&gt;Unfortunately it gives the same correct line value and 0 on total&lt;/P&gt;&lt;P&gt;Any thing else in mind ?&lt;/P&gt;</description>
      <pubDate>Sat, 01 Apr 2023 20:14:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167256#M113975</guid>
      <dc:creator>Mostafa-Hussien</dc:creator>
      <dc:date>2023-04-01T20:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get correct total on complex model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167259#M113976</link>
      <description>&lt;P&gt;I cannot drop the ALLSELETED(), otherwise it will not aggregate regardless of the ALLSELECTED arguments.&lt;/P&gt;&lt;P&gt;I mean; I added certain columns to ALLSELECTED like CLIENTID, because I want an aggregate value regardless of CLIENTID&lt;/P&gt;</description>
      <pubDate>Sat, 01 Apr 2023 20:16:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167259#M113976</guid>
      <dc:creator>Mostafa-Hussien</dc:creator>
      <dc:date>2023-04-01T20:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get correct total on complex model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167262#M113977</link>
      <description>&lt;P&gt;Not the best solution, but as an easy and fast solution to fix it, please try this as well. It should work for your total:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure =
VAR _TABLEE =
    ADDCOLUMNS (
        SUMMARIZE (
            GENERAL_ACCOUNT,
            GENERAL_ACCOUNT[BU],
            GENERAL_ACCOUNT[Link],
            GENERAL_ACCOUNT[ACCOUNTCODE]
        ),
        "@measure3", [measure3]
    )
RETURN
    SUMX ( _TABLEE, [@measure3] )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Apr 2023 20:26:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167262#M113977</guid>
      <dc:creator>MohammadLoran25</dc:creator>
      <dc:date>2023-04-01T20:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get correct total on complex model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167264#M113978</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="527398" data-lia-user-login="MohammadLoran25" class="lia-mention lia-mention-user"&gt;MohammadLoran25&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works fine for returning positive and negative values and correct total&lt;/P&gt;&lt;P&gt;But how can i retrieve only positive values while retaining a correct total ?&lt;/P&gt;</description>
      <pubDate>Sat, 01 Apr 2023 20:32:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167264#M113978</guid>
      <dc:creator>Mostafa-Hussien</dc:creator>
      <dc:date>2023-04-01T20:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get correct total on complex model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167266#M113979</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="539969" data-lia-user-login="Mostafa-Hussien" class="lia-mention lia-mention-user"&gt;Mostafa-Hussien&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Measure3 =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;VAR SelectedDims =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ALLSELECTED (&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GENERAL_ACCOUNT[DEPTID],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GENERAL_ACCOUNT[CLIENTID],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GENERAL_ACCOUNT[DOCDATE],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GENERAL_ACCOUNT[DOCNO]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SUMX (&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SUMMARIZE (&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GENERAL_ACCOUNT,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GENERAL_ACCOUNT[BU],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GENERAL_ACCOUNT[Link],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GENERAL_ACCOUNT[ACCOUNTCODE],&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;GENERAL_ACCOUNT[SECTORID]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;VAR Value1 =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CALCULATE (&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SUMX ( GENERAL_ACCOUNT, [Measure1] ),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SelectedDims,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;--acc&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;USERELATIONSHIP ( DimLink[LinkCode], ACCOUNTS[Link] ),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;USERELATIONSHIP ( DimBU[BUCode], ACCOUNTS[BU] ),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;--dep&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;USERELATIONSHIP ( DimLink[LinkCode], DEPARTMENTS[Link] ),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;USERELATIONSHIP ( DimBU[BUCode], DEPARTMENTS[BU] ),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;--sector&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;USERELATIONSHIP ( DimLink[LinkCode], SECTORS[Link] ),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;USERELATIONSHIP ( DimBU[BUCode], SECTORS[BU] ),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;--general acc&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;USERELATIONSHIP ( DimLink[LinkCode], GENERAL_ACCOUNT[Link] ),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;USERELATIONSHIP ( DimBU[BUCode], GENERAL_ACCOUNT[BU] )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IF ( Value &amp;lt; 0, 0, Value1 )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Apr 2023 20:36:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167266#M113979</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-04-01T20:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get correct total on complex model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167272#M113980</link>
      <description>&lt;P&gt;Your [measure3] only returns postivie value so the measure I sent recently should work for positive values.&lt;/P&gt;</description>
      <pubDate>Sat, 01 Apr 2023 20:42:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167272#M113980</guid>
      <dc:creator>MohammadLoran25</dc:creator>
      <dc:date>2023-04-01T20:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get correct total on complex model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167273#M113981</link>
      <description>&lt;P&gt;SECTORID is not a column on the GENERAL_ACCOUNT table. GENERAL_ACCOUNT table has a DEPTID column that has an active relationship many to one on SECTOR table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So instead I tried adding GENERAL_ACCOUNT[DEPTID] on the SUMMARIZE, and this time it returned a higher value for the positive value, and unfortunately the total is still 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate your response a lot. Any other methods to try ?&lt;/P&gt;</description>
      <pubDate>Sat, 01 Apr 2023 20:44:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167273#M113981</guid>
      <dc:creator>Mostafa-Hussien</dc:creator>
      <dc:date>2023-04-01T20:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get correct total on complex model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167275#M113982</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="527398" data-lia-user-login="MohammadLoran25" class="lia-mention lia-mention-user"&gt;MohammadLoran25&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Oh sorry, I corrected my measure according to what you said.&lt;/P&gt;&lt;P&gt;Now it returns the correct positive line value but still the total is zero&lt;/P&gt;</description>
      <pubDate>Sat, 01 Apr 2023 20:49:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167275#M113982</guid>
      <dc:creator>Mostafa-Hussien</dc:creator>
      <dc:date>2023-04-01T20:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get correct total on complex model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167278#M113983</link>
      <description>&lt;P&gt;In SUMX, you put [@measure3] or [measure3] ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[@measure3] is the name we gave to it in table VAR. You put this [@measure3]?&lt;/P&gt;</description>
      <pubDate>Sat, 01 Apr 2023 20:55:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167278#M113983</guid>
      <dc:creator>MohammadLoran25</dc:creator>
      <dc:date>2023-04-01T20:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get correct total on complex model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167279#M113984</link>
      <description>&lt;P&gt;Yes, I double-checked and yes. And it still has 0 on total&lt;/P&gt;</description>
      <pubDate>Sat, 01 Apr 2023 20:57:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167279#M113984</guid>
      <dc:creator>Mostafa-Hussien</dc:creator>
      <dc:date>2023-04-01T20:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get correct total on complex model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167287#M113985</link>
      <description>&lt;P&gt;How about this one:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure =
VAR _TABLEE =
    ADDCOLUMNS (
        SUMMARIZE (
            GENERAL_ACCOUNT,
            GENERAL_ACCOUNT[BU],
            GENERAL_ACCOUNT[Link],
            GENERAL_ACCOUNT[ACCOUNTCODE]
        ),
        "@MYMEASURE", IF([measure2]&amp;gt;0,[measure2])
    )
RETURN
    SUMX ( _TABLEE, [@MYMEASURE] )&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 01 Apr 2023 21:25:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167287#M113985</guid>
      <dc:creator>MohammadLoran25</dc:creator>
      <dc:date>2023-04-01T21:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get correct total on complex model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167288#M113986</link>
      <description>&lt;P&gt;Still correct positive line values and blank on total and negative values&lt;/P&gt;</description>
      <pubDate>Sat, 01 Apr 2023 21:33:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167288#M113986</guid>
      <dc:creator>Mostafa-Hussien</dc:creator>
      <dc:date>2023-04-01T21:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get correct total on complex model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167316#M113990</link>
      <description>&lt;P&gt;And this one:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure =
VAR _TABLEE =
    ADDCOLUMNS (
        SUMMARIZE (
            GENERAL_ACCOUNT,
            GENERAL_ACCOUNT[BU],
            GENERAL_ACCOUNT[Link],
            GENERAL_ACCOUNT[ACCOUNTCODE],
            GENERAL_ACCOUNT[DeptId]
        ),
        "@MYMEASURE", IF([measure2]&amp;gt;0,[measure2])
    )
RETURN
    SUMX ( _TABLEE, [@MYMEASURE] )&lt;/LI-CODE&gt;&lt;P&gt;If not, please share a sample of your data and data model.&lt;/P&gt;</description>
      <pubDate>Sat, 01 Apr 2023 22:41:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167316#M113990</guid>
      <dc:creator>MohammadLoran25</dc:creator>
      <dc:date>2023-04-01T22:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get correct total on complex model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167324#M113992</link>
      <description>&lt;P&gt;This tripled the positive value while negative and total are still blank&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, I will prepare a .pbix file with required tables (its a big model with 35+ tables in snowflake, so I wil cut it only to tables relative to this problem)&lt;/P&gt;</description>
      <pubDate>Sat, 01 Apr 2023 22:54:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167324#M113992</guid>
      <dc:creator>Mostafa-Hussien</dc:creator>
      <dc:date>2023-04-01T22:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get correct total on complex model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167345#M113997</link>
      <description>&lt;P&gt;I uploaded the pbix file here&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.dropbox.com/s/uxr3htuaxrz9hk8/d3-test.pbix?dl=0" target="_blank"&gt;https://www.dropbox.com/s/uxr3htuaxrz9hk8/d3-test.pbix?dl=0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This contains the relevant tables and my original measures and the result that I am not able to alter. I really appreciate if you can help me with this riddle&lt;/P&gt;</description>
      <pubDate>Sat, 01 Apr 2023 23:25:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167345#M113997</guid>
      <dc:creator>Mostafa-Hussien</dc:creator>
      <dc:date>2023-04-01T23:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get correct total on complex model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167346#M113998</link>
      <description>&lt;P&gt;I uploaded the pbix file here&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.dropbox.com/s/uxr3htuaxrz9hk8/d3-test.pbix?dl=0" target="_blank"&gt;https://www.dropbox.com/s/uxr3htuaxrz9hk8/d3-test.pbix?dl=0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This contains the relevant tables and my original measures and the result that I am not able to alter. I really appreciate if you can help me with this riddle&lt;/P&gt;</description>
      <pubDate>Sat, 01 Apr 2023 23:26:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167346#M113998</guid>
      <dc:creator>Mostafa-Hussien</dc:creator>
      <dc:date>2023-04-01T23:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: Cant get correct total on complex model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167634#M114037</link>
      <description>&lt;P&gt;Hi Again&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="539969" data-lia-user-login="Mostafa-Hussien" class="lia-mention lia-mention-user"&gt;Mostafa-Hussien&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;This is what you need:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;FinalMeasure =
VAR _TABLEE =
    ADDCOLUMNS (
        SUMMARIZECOLUMNS (
            'Fact_General_Account'[BU],
            'Fact_General_Account'[Link],
            'DimSectors'[SECTORID],
            'Fact_General_Account'[ACCOUNTS.ACCOUNTCODE],
            DimDept[SECTORID]
        ),
        "@MYMEASURE", [measure3]
    )
RETURN
    SUMX ( _TABLEE, [@MYMEASURE] )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Loran&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 02 Apr 2023 09:09:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Cant-get-correct-total-on-complex-model/m-p/3167634#M114037</guid>
      <dc:creator>MohammadLoran25</dc:creator>
      <dc:date>2023-04-02T09:09:46Z</dc:date>
    </item>
  </channel>
</rss>

