<?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: HEADER AND DETAILS ROW DIFFERENT in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/HEADER-AND-DETAILS-ROW-DIFFERENT/m-p/3000595#M101264</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="421442" data-lia-user-login="murillocosta" class="lia-mention lia-mention-user"&gt;murillocosta&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your requirements description, one of the four measures you created "Total Credit Found" in your visual matrix is displayed correctly in some Customers, and some Customers are displayed incorrectly, according to my local testing and research here, it is indeed because of your measure "Total Credit Found" The Switch() function applied to causes problems caused by changes in the logic of the total operation in the current context, and based on my tests based on the .pbix file you provided, you can try to create a new measure like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Total Credit Found2 = SUMX( VALUES('fCustomerDebt'[TRANSACTION_NUMBER]) , [Total Credit Found])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jan 2023 09:44:45 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-01-04T09:44:45Z</dc:date>
    <item>
      <title>HEADER AND DETAILS ROW DIFFERENT</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/HEADER-AND-DETAILS-ROW-DIFFERENT/m-p/2998705#M101143</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;&lt;BR /&gt;Would someone be able to help me with the below? I'm sending the file to be easier to understand&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1dZveWksvVjSp3hcG6G-OrnKMuaJ0XXJw/view?usp=sharing" target="_self"&gt;FILE&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I have to fact tables&lt;BR /&gt;&lt;BR /&gt;- Customer Debt - which is customer document transactions&lt;BR /&gt;- Customer Credit - which are customer credit transactions&lt;BR /&gt;&lt;BR /&gt;They are joined through transaction_id (1:n)&lt;BR /&gt;&lt;BR /&gt;My goal is to create a matrix table visual per customer with a Total Balance measure&lt;BR /&gt;&lt;BR /&gt;Total Balance = Total Invoice - Total Credit&lt;BR /&gt;&lt;BR /&gt;Total Invoice = Total transaction from Fact table Customer Debt&lt;BR /&gt;Total Credit = the total credit that the customer has which is being obtained from the "Total Credit Found" measure&lt;BR /&gt;&lt;BR /&gt;PROBLEM:&lt;BR /&gt;&lt;BR /&gt;- Sometimes the header is calculated correctly and the details incorrect&lt;BR /&gt;- Sometimes the details are calculated correctly and the header not&lt;BR /&gt;&lt;BR /&gt;For example&lt;BR /&gt;&lt;BR /&gt;1- I have customer C10444 - Child 1 which should be showing a Total balance of $238.98 instead of $566.50 (Although the total header is calculating correctly using $238.98)&lt;BR /&gt;&lt;BR /&gt;2- To the second customer C31975 - Child 2- which is the opposite the row level is showing the correct balance (invoice - credit), but the total header is calculating $49.130.47 while the correct total is $29,804.72&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&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;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2023 13:47:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/HEADER-AND-DETAILS-ROW-DIFFERENT/m-p/2998705#M101143</guid>
      <dc:creator>murillocosta</dc:creator>
      <dc:date>2023-01-03T13:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: HEADER AND DETAILS ROW DIFFERENT</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/HEADER-AND-DETAILS-ROW-DIFFERENT/m-p/2998881#M101159</link>
      <description>&lt;P&gt;I am not able to download your file due to firewall isssues at my end. But I suspect you have some problem with the Customer Dimension or it's relationship with the other fact tables. Are you defining Customer Dimension as a separate table or is it a part of one of the Fact tables. If it is a part of one of the fact tables, then which table? Try to make it as a separate dimension and use the Customer name and Customer Parent Name fields from the Customer Dimension.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2023 15:09:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/HEADER-AND-DETAILS-ROW-DIFFERENT/m-p/2998881#M101159</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-03T15:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: HEADER AND DETAILS ROW DIFFERENT</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/HEADER-AND-DETAILS-ROW-DIFFERENT/m-p/2999567#M101217</link>
      <description>&lt;P&gt;Hi Shalinder, thanks for you message.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried including Customers as dimesion it worked for the first customerbut the others is still incorrect &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; . I suspect that might be the way I am calculating the measure "Total Credit Found" as I am using SWITCH not sure if that would have any influence&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;New Link:&amp;nbsp;&lt;A href="https://1drv.ms/u/s!AtCiLfFdr1MmpigsnSJibxL9eDLF?e=QF2EFR" target="_blank"&gt;https://1drv.ms/u/s!AtCiLfFdr1MmpigsnSJibxL9eDLF?e=QF2EFR&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;TOTAL INVOICE&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TOTAL CREDIT FOUND&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TOTAL BALANCE&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;TOTAL BALANCE S (is another attempt which didn't work as well)&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PBI RESULT:&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;CORRECT:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2023 22:31:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/HEADER-AND-DETAILS-ROW-DIFFERENT/m-p/2999567#M101217</guid>
      <dc:creator>murillocosta</dc:creator>
      <dc:date>2023-01-03T22:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: HEADER AND DETAILS ROW DIFFERENT</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/HEADER-AND-DETAILS-ROW-DIFFERENT/m-p/3000595#M101264</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="421442" data-lia-user-login="murillocosta" class="lia-mention lia-mention-user"&gt;murillocosta&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your requirements description, one of the four measures you created "Total Credit Found" in your visual matrix is displayed correctly in some Customers, and some Customers are displayed incorrectly, according to my local testing and research here, it is indeed because of your measure "Total Credit Found" The Switch() function applied to causes problems caused by changes in the logic of the total operation in the current context, and based on my tests based on the .pbix file you provided, you can try to create a new measure like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Total Credit Found2 = SUMX( VALUES('fCustomerDebt'[TRANSACTION_NUMBER]) , [Total Credit Found])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2023 09:44:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/HEADER-AND-DETAILS-ROW-DIFFERENT/m-p/3000595#M101264</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-04T09:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: HEADER AND DETAILS ROW DIFFERENT</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/HEADER-AND-DETAILS-ROW-DIFFERENT/m-p/3001261#M101336</link>
      <description>&lt;P&gt;I can not see the underlying table for Credit Amount. Any specific reason you have a complex calculation embedded in DAX? It seems like due to the filter context the end result is getting affected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you share the data structure for Credit table and the logic (in plain english) for computing the "Total Invoice Found".&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2023 14:46:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/HEADER-AND-DETAILS-ROW-DIFFERENT/m-p/3001261#M101336</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-04T14:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: HEADER AND DETAILS ROW DIFFERENT</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/HEADER-AND-DETAILS-ROW-DIFFERENT/m-p/3001974#M101390</link>
      <description>&lt;P&gt;Thanks mate!! That's exactly what I was looking for.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2023 22:07:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/HEADER-AND-DETAILS-ROW-DIFFERENT/m-p/3001974#M101390</guid>
      <dc:creator>murillocosta</dc:creator>
      <dc:date>2023-01-04T22:07:49Z</dc:date>
    </item>
  </channel>
</rss>

