<?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: Visualisation not showing correct results from multiple tables in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Visualisation-not-showing-correct-results-from-multiple-tables/m-p/4075846#M161828</link>
    <description>&lt;P&gt;Apologies if a simple question but how to you modify the filter context?&lt;/P&gt;</description>
    <pubDate>Fri, 02 Aug 2024 11:18:59 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-08-02T11:18:59Z</dc:date>
    <item>
      <title>Visualisation not showing correct results from multiple tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Visualisation-not-showing-correct-results-from-multiple-tables/m-p/4075773#M161826</link>
      <description>&lt;P&gt;Hi, so im reletively new to powerbi but seem to be making good ground.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However I have an issue where im trying to have a visual bring back results from two different tables&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ive screenshot the relationships below. Basically Im looking to have a table visualisation which shows the category and the the contract value and the amount spent against the contract. The Contracts are in the register and the spend in the spend table. To link them I had to create a intermidary table which had the supplier account code which is in both tables multiple times (I could link the tables directly because of this as multiple contracts have the same supplier account code and multiple invoices are listed in the spend table with the account code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the output example below im taking the category level 1 field from the contracts table, the total contract value from the contracts table and the amount excluding vat from the spend table. However the figure reported from the spend table is the total for all invoices.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do i correct this so i can see the contract value and spend by category?&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2024 10:45:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Visualisation-not-showing-correct-results-from-multiple-tables/m-p/4075773#M161826</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-02T10:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: Visualisation not showing correct results from multiple tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Visualisation-not-showing-correct-results-from-multiple-tables/m-p/4075813#M161827</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Use calculate and modify the filter context:&lt;BR /&gt;&lt;BR /&gt;Example tables:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Simple sum won't work:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;However this will work:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Measure&lt;/SPAN&gt; &lt;SPAN&gt;32&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;_supplier&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table (42)'&lt;/SPAN&gt;&lt;SPAN&gt;[Supplier]&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table (41)'&lt;/SPAN&gt;&lt;SPAN&gt;[Value]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;'Table (41)'&lt;/SPAN&gt;&lt;SPAN&gt;[Supplier]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;_supplier&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img /&gt;
&lt;P&gt;I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!&lt;BR /&gt;&lt;BR /&gt;My LinkedIn: &lt;A href="https://www.linkedin.com/in/n%C3%A4ttiahov-00001/" target="_blank"&gt;https://www.linkedin.com/in/n%C3%A4ttiahov-00001/&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 02 Aug 2024 11:00:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Visualisation-not-showing-correct-results-from-multiple-tables/m-p/4075813#M161827</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2024-08-02T11:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: Visualisation not showing correct results from multiple tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Visualisation-not-showing-correct-results-from-multiple-tables/m-p/4075846#M161828</link>
      <description>&lt;P&gt;Apologies if a simple question but how to you modify the filter context?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2024 11:18:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Visualisation-not-showing-correct-results-from-multiple-tables/m-p/4075846#M161828</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-02T11:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: Visualisation not showing correct results from multiple tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Visualisation-not-showing-correct-results-from-multiple-tables/m-p/4075899#M161830</link>
      <description>&lt;P&gt;In the example I provided:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;DIV&gt;&lt;SPAN&gt;Measure&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;32&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;=&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;_supplier&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table (42)'&lt;/SPAN&gt;&lt;SPAN&gt;[Supplier]&lt;/SPAN&gt;&lt;SPAN&gt;)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table (41)'&lt;/SPAN&gt;&lt;SPAN&gt;[Value]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;STRONG&gt;'Table (41)'[Supplier]=_supplier)&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;Here we take the supplier information from one table and use it to calculate the corresponding value from the other.&lt;/DIV&gt;</description>
      <pubDate>Fri, 02 Aug 2024 11:44:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Visualisation-not-showing-correct-results-from-multiple-tables/m-p/4075899#M161830</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2024-08-02T11:44:28Z</dc:date>
    </item>
  </channel>
</rss>

