<?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: wrong measure total including if statement in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4140099#M164511</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="431050" data-lia-user-login="Laura1996" class="lia-mention lia-mention-user"&gt;Laura1996&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No worries, i thought i misunderstood your requirement.&lt;/P&gt;</description>
    <pubDate>Mon, 09 Sep 2024 07:29:08 GMT</pubDate>
    <dc:creator>Irwan</dc:creator>
    <dc:date>2024-09-09T07:29:08Z</dc:date>
    <item>
      <title>wrong measure total including if statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4139843#M164480</link>
      <description>&lt;P&gt;I have a table "Komm", which looks like following. Right now my Total of "Factor final" is wrong and I cant wrap my head arount how to do it correctly:&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;Product&lt;/TD&gt;&lt;TD&gt;Description&lt;/TD&gt;&lt;TD&gt;Amount&lt;/TD&gt;&lt;TD&gt;Unit&lt;/TD&gt;&lt;TD&gt;Factor (comes from another table called "Factors")&lt;/TD&gt;&lt;TD&gt;Factor final&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Tom&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;Apple&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;ST&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jack&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;Rope&lt;/TD&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;TD&gt;M&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jack&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;Apple&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;ST&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Cole&lt;/TD&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;TD&gt;Pumpkin&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;KG&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically what I want is, that if in my visual I click on the name of the Person, for example Jack he sums up 6 + 15 = 21. So the result is 21. When Jack is not selected it should show the whole sum (over all lines). Additionally to that I have different calculations depending on the Unit, so for "M", "GA", "L" and "KG" he should calculate the Factor * 1, for all the other units the Factor should be multiplied with the Amount.&lt;BR /&gt;&lt;BR /&gt;What I tried is following:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;BR /&gt;Faktor final =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN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lt;SPAN&gt;[Factor]&lt;/SPAN&gt;&lt;SPAN&gt;*&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SUMX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Komm&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;Komm&lt;/SPAN&gt;&lt;SPAN&gt;[Amount]&lt;/SPAN&gt;&lt;SPAN&gt;* &lt;/SPAN&gt;&lt;SPAN&gt;RELATED&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Factors'&lt;/SPAN&gt;&lt;SPAN&gt;[Factor]&lt;/SPAN&gt;&lt;SPAN&gt;)))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;Hope somebody can help me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 05:06:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4139843#M164480</guid>
      <dc:creator>Laura1996</dc:creator>
      <dc:date>2024-09-09T05:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: wrong measure total including if statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4139887#M164485</link>
      <description>&lt;P&gt;hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="431050" data-lia-user-login="Laura1996" class="lia-mention lia-mention-user"&gt;Laura1996&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please check if this accomodate your need.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;create a new measure with following DAX.&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;Measure&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; _Name = &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;('Table'[Name])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Return&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;HASONEVALUE&lt;/SPAN&gt;&lt;SPAN&gt;('Table'[Product]),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SUMX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt;('Table'),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Table'[Unit]=&lt;/SPAN&gt;&lt;SPAN&gt;"ST"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Table'[Amount]*'Table'[Factor (comes from another table called "Factors")],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Table'[Factor (comes from another table called "Factors")]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SUMX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt;('Table'),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Table'[Name]=_Name&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Table'[Unit]=&lt;/SPAN&gt;&lt;SPAN&gt;"ST"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Table'[Amount]*'Table'[Factor (comes from another table called "Factors")],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Table'[Factor (comes from another table called "Factors")]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hope this will help.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 09 Sep 2024 05:41:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4139887#M164485</guid>
      <dc:creator>Irwan</dc:creator>
      <dc:date>2024-09-09T05:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: wrong measure total including if statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4139906#M164488</link>
      <description>&lt;P&gt;hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="490030" data-lia-user-login="Irwan" class="lia-mention lia-mention-user"&gt;Irwan&lt;/a&gt; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Unfortunately it doesn't do what it should...as the field "Factor" comes from another table and this table is not mentioned in "ALLSELECTED" he cant find the field. Also ALLSELECTED allows just one argument.&lt;BR /&gt;&lt;BR /&gt;I tried to solve it over related, but its making strange calculations. With my measure they were right and just the total was wrong for the rows selected, now he calculates 6* 0,88 = 3.709,60 which makes no sense. In fact the result is 3709,60 for all the rows.&lt;BR /&gt;&lt;BR /&gt;Also in your Screenshot he calculates 6+3 as 21, when it should be 9. And when you dont select anything he calculates it as 31, which is also not correct...&lt;BR /&gt;it actually should be a super simple measure but it became lemon difficult &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt; thank you anyway for trying, hope someone can provide me a working solution&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 06:14:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4139906#M164488</guid>
      <dc:creator>Laura1996</dc:creator>
      <dc:date>2024-09-09T06:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: wrong measure total including if statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4139939#M164496</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Also I need to focus on this "&lt;/SPAN&gt;&lt;SPAN&gt;collecting=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"M"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;||&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;collecting&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"GA"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;||&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;collecting&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"L"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;||&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;collecting&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"KG"&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;the measure shouldn't work with "ST", because there are many more units than just those mentioned up. So when I make an if statement, I have to define which to "exclude" rather than which to consider.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 06:15:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4139939#M164496</guid>
      <dc:creator>Laura1996</dc:creator>
      <dc:date>2024-09-09T06:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: wrong measure total including if statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4139964#M164498</link>
      <description>&lt;P&gt;Wait, you said in your first post, Jack has value of 21 which is 6+15.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought 6 (2*3 because ST) and 15 (5*3 because ST), no?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What value for Jack, 9 or 21?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And when not selected, 6 (2*3 ST) + 15 (5*3 ST) + 6 (6*1 M) + 4 (4*1 KG) = 31&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also those M, GA, L, KG in if statement, as far as i can tell, this only for differentiate which will be multiplied and not. I only put ST for multiplying and you can add the rest.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 06:32:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4139964#M164498</guid>
      <dc:creator>Irwan</dc:creator>
      <dc:date>2024-09-09T06:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: wrong measure total including if statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4140025#M164504</link>
      <description>&lt;P&gt;Yes sorry, that was my mistake now because I didn't seen the number 15 in your table. 21 should be correct. Also 31 is correct, however its not working for my data, because my result is always 3709,60. And also in your code I can't add the other table for the Factor (Table "Factor").&lt;BR /&gt;&lt;BR /&gt;Actually trying to add the rest is not working or at least I didn't still figure out how to make it work...&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 06:54:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4140025#M164504</guid>
      <dc:creator>Laura1996</dc:creator>
      <dc:date>2024-09-09T06:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: wrong measure total including if statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4140029#M164505</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="490030" data-lia-user-login="Irwan" class="lia-mention lia-mention-user"&gt;Irwan&lt;/a&gt;&amp;nbsp;Anyway - sorry for the confusion &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 06:55:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4140029#M164505</guid>
      <dc:creator>Laura1996</dc:creator>
      <dc:date>2024-09-09T06:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: wrong measure total including if statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4140094#M164509</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="431050" data-lia-user-login="Laura1996" class="lia-mention lia-mention-user"&gt;Laura1996&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do you collect value from another table?&lt;/P&gt;&lt;P&gt;If it is from a column in another table, you can try adding variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can not test it right now but something like this : var _Factor = SELECTEDVALUE('Table 2'[Factor]).&lt;/P&gt;&lt;P&gt;Then use that variable to replace factor value from DAX above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 07:28:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4140094#M164509</guid>
      <dc:creator>Irwan</dc:creator>
      <dc:date>2024-09-09T07:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: wrong measure total including if statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4140099#M164511</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="431050" data-lia-user-login="Laura1996" class="lia-mention lia-mention-user"&gt;Laura1996&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No worries, i thought i misunderstood your requirement.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 07:29:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4140099#M164511</guid>
      <dc:creator>Irwan</dc:creator>
      <dc:date>2024-09-09T07:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: wrong measure total including if statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4140249#M164518</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="490030" data-lia-user-login="Irwan" class="lia-mention lia-mention-user"&gt;Irwan&lt;/a&gt;&amp;nbsp; thank you for your help. I hope somebody can provide me another solution because whatever I do - with your dax I have way too high calculations and I don't know why.&lt;BR /&gt;&lt;BR /&gt;Thank you anyway for your help&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 08:41:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4140249#M164518</guid>
      <dc:creator>Laura1996</dc:creator>
      <dc:date>2024-09-09T08:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: wrong measure total including if statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4144426#M164711</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="431050" data-lia-user-login="Laura1996" class="lia-mention lia-mention-user"&gt;Laura1996&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Based on the description, try to use the following DAX formula.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Faktor final = 
VAR IsSpecificUnit = 
    SUMX(
        Komm, 
        IF(
            Komm[Unit] IN {"M", "GA", "L", "KG"}, 
            RELATED('Factor'[Factor]), 
            Komm[Amount] * RELATED('Factor'[Factor])
        )
    )
RETURN 
    IF (
        HASONEVALUE(Komm[Name]),
        IsSpecificUnit,
        SUMX(
            Komm,
            IF (
                Komm[Unit] IN {"M", "GA", "L", "KG"},
                RELATED('Factor'[Factor]),
                Komm[Amount] * RELATED('Factor'[Factor])
            )
        )
    )&lt;/LI-CODE&gt;
&lt;P&gt;Then, select the Jack name.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Wisdom Wu&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2024 08:15:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4144426#M164711</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-11T08:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: wrong measure total including if statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4153794#M165086</link>
      <description>&lt;P&gt;Hey, thank you for the answer.&lt;BR /&gt;&lt;BR /&gt;Unfortunately something with the calculation still doesn't go right:&lt;BR /&gt;&lt;BR /&gt;Here some results:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The strange thing is that sometimes the calculation is correct and sometimes not. I have no other sums in my visual...so I don't know what it could be... The sum here should be 53,50 considering that I added also M2 into your code... any ideas what it could be?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2024 05:59:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4153794#M165086</guid>
      <dc:creator>Laura1996</dc:creator>
      <dc:date>2024-09-17T05:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: wrong measure total including if statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4159301#M165266</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="431050" data-lia-user-login="Laura1996" class="lia-mention lia-mention-user"&gt;Laura1996&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;I would like to know how 53.5 is calculated? Which row values are added together to get the result?&lt;/P&gt;
&lt;P&gt;What's more, try to check if any other filters are being applied.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Wisdom Wu&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2024 09:32:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4159301#M165266</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-19T09:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: wrong measure total including if statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4162338#M165373</link>
      <description>&lt;P&gt;5 M * 10 should equal 10, because thats what the formula says. But it equals 20. The same thing with 6 M.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Because I have to be able to filter also the month / week / day of a persons collected products this triggers the mistake - at least this is what I think. Because when I remove the filter its correct. I never had this problem in any other reports. Is there any way to also include month / week / day into the calculation?&lt;BR /&gt;&lt;BR /&gt;here a screenshot of the date:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;the week number I extracted by myself, so I can use it in a calculation. Do I have to do the same stuff for day/month, and how would the code look like, because HASONEVALUE() can work just with one value as far as Im concerned.&lt;BR /&gt;&lt;BR /&gt;Thank you very much&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Sep 2024 12:44:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4162338#M165373</guid>
      <dc:creator>Laura1996</dc:creator>
      <dc:date>2024-09-20T12:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: wrong measure total including if statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4165514#M165486</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="431050" data-lia-user-login="Laura1996" class="lia-mention lia-mention-user"&gt;Laura1996&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Based on the description, try using the following DAX formula.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Faktor final = 
VAR IsSpecificUnit = 
    SUMX(
        Komm, 
        IF(
            Komm[Unit] IN {"M", "GA", "L", "KG"}, 
            RELATED('Factor'[Factor]), 
            Komm[Amount] * RELATED('Factor'[Factor])
        )
    )
RETURN 
    IF (
        HASONEVALUE(Komm[Name]),
        CALCULATE(
        SUMX(Komm, Komm[Amount] * RELATED('Factors'[Factor])),
        FILTER(
            Komm,
            Komm[Name] = SELECTEDVALUE(Komm[Name]) &amp;amp;&amp;amp;
            Komm[Month] = SELECTEDVALUE(Komm[Month]) &amp;amp;&amp;amp;
            Komm[Week] = SELECTEDVALUE(Komm[Week]) &amp;amp;&amp;amp;
            Komm[Day] = SELECTEDVALUE(Komm[Day])
        )
    ), IsSpecificUnit

    )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Wisdom Wu&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2024 01:24:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4165514#M165486</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-23T01:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: wrong measure total including if statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4166841#M165532</link>
      <description>&lt;P&gt;hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;well, now its even worse &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt; this is the result:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;so now its 2.818,00 instead of 53,50 and it kind of ignores the rule for "M, M2, KG,.."&lt;BR /&gt;&lt;BR /&gt;this report makes me crazy&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2024 09:31:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4166841#M165532</guid>
      <dc:creator>Laura1996</dc:creator>
      <dc:date>2024-09-23T09:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: wrong measure total including if statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4166954#M165538</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="431050" data-lia-user-login="Laura1996" class="lia-mention lia-mention-user"&gt;Laura1996&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I forget the rule for M, M2. Please try using the following DAX formula.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Faktor final = 
VAR IsSpecificUnit = 
    SUMX(
        Komm, 
        IF(
            Komm[Unit] IN {"M", "GA", "L", "KG"}, 
            RELATED('Factor'[Factor]), 
            Komm[Amount] * RELATED('Factor'[Factor])
        )
    )
RETURN 
    IF (
        HASONEVALUE(Komm[Name]),
        IF(
            Komm[Unit] IN {"M", "GA", "L", "KG"}, 
            RELATED('Factor'[Factor]), 
            CALCULATE(
                SUMX(Komm, Komm[Amount] * RELATED('Factors'[Factor])),
                FILTER(
                Komm,
                Komm[Name] = SELECTEDVALUE(Komm[Name]) &amp;amp;&amp;amp;
                Komm[Month] = SELECTEDVALUE(Komm[Month]) &amp;amp;&amp;amp;
                Komm[Week] = SELECTEDVALUE(Komm[Week]) &amp;amp;&amp;amp;
                Komm[Day] = SELECTEDVALUE(Komm[Day])
            )
        ), 
        IsSpecificUnit
    )&lt;/LI-CODE&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Wisdom Wu&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;, then please consider&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2024 10:10:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4166954#M165538</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-23T10:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: wrong measure total including if statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4167234#M165550</link>
      <description>&lt;P&gt;hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;unfortunately now dax is telling me that I have too many arguments and that there can be a max. of 3:&lt;BR /&gt;&lt;BR /&gt;it specifically underlines (in the paragraph after the RETURN):&lt;/P&gt;&lt;PRE&gt;Komm[Unit] IN {"M", "GA", "L", "KG"}, 
            RELATED('Factor'[Factor]), &lt;/PRE&gt;&lt;P&gt;&amp;amp;&lt;/P&gt;&lt;PRE&gt; IsSpecificUnit&lt;/PRE&gt;&lt;P&gt;also he's not finding me the variable "Factor" or "Unit" in that if statement&lt;BR /&gt;wish I could finally mark this as resolved...but its giving me a headache &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2024 12:48:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4167234#M165550</guid>
      <dc:creator>Laura1996</dc:creator>
      <dc:date>2024-09-23T12:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: wrong measure total including if statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4167684#M165573</link>
      <description>&lt;P&gt;Hi, try this&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="431050" data-lia-user-login="Laura1996" class="lia-mention lia-mention-user"&gt;Laura1996&lt;/a&gt;&amp;nbsp; - Data is the table name so replace with your table name (KOMM) and I have called the Measure 'New Factor' instead of 'Final Factor';&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;New Factor =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;_Tbl&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ADDCOLUMNS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SELECTCOLUMNS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Data&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Data&lt;/SPAN&gt;&lt;SPAN&gt;[Name]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Data&lt;/SPAN&gt;&lt;SPAN&gt;[Description]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Data&lt;/SPAN&gt;&lt;SPAN&gt;[Amount]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Data&lt;/SPAN&gt;&lt;SPAN&gt;[Factor (comes from another table called "Factors")]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;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SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Data&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Data&lt;/SPAN&gt;&lt;SPAN&gt;[Amount]&lt;/SPAN&gt;&lt;SPAN&gt;*&lt;/SPAN&gt;&lt;SPAN&gt;Data&lt;/SPAN&gt;&lt;SPAN&gt;[Factor (comes from another table called "Factors")]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt; &lt;SPAN&gt;SUMX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;_Tbl&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;[Final Factor]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 23 Sep 2024 15:06:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4167684#M165573</guid>
      <dc:creator>Nonessential</dc:creator>
      <dc:date>2024-09-23T15:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: wrong measure total including if statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4170709#M165673</link>
      <description>&lt;P&gt;hey&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="810873" data-lia-user-login="Nonessential" class="lia-mention lia-mention-user"&gt;Nonessential&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;thank you for your try, unfortunately, The Factor is not in the same table, so the code is not working. I marked the problem in red, tried i with the relate function or to summarize, however don't know how to make it work:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;New Factor =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;_Tbl&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;=&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ADDCOLUMNS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SELECTCOLUMNS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Data&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Data&lt;/SPAN&gt;&lt;SPAN&gt;[Name]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Data&lt;/SPAN&gt;&lt;SPAN&gt;[Description]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Data&lt;/SPAN&gt;&lt;SPAN&gt;[Amount]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;Data&lt;/SPAN&gt;&lt;SPAN&gt;[Factor (comes from another table called "Factors")]&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Data&lt;/SPAN&gt;&lt;SPAN&gt;[Unit]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"Final Factor"&lt;/SPAN&gt;&lt;SPA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PAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Data&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Data&lt;/SPAN&gt;&lt;SPAN&gt;[Amount]&lt;/SPAN&gt;&lt;SPAN&gt;*&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;Data&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;[Factor (comes from another table called "Factors")&lt;/FONT&gt;]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;SUMX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;_Tbl&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;[Final Factor]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 24 Sep 2024 13:31:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/wrong-measure-total-including-if-statement/m-p/4170709#M165673</guid>
      <dc:creator>Laura1996</dc:creator>
      <dc:date>2024-09-24T13:31:51Z</dc:date>
    </item>
  </channel>
</rss>

