<?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: I have a sql query that I'd like to code in dax, how can I achieve this? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-have-a-sql-query-that-I-d-like-to-code-in-dax-how-can-I/m-p/4103015#M162810</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="430441" data-lia-user-login="jgeddes" class="lia-mention lia-mention-user"&gt;jgeddes&lt;/a&gt;&amp;nbsp;Sorry for late response, I went with sql query so that I couldn load any way that I wanted.&lt;BR /&gt;However, we could do distinct column (mutual) to create a table and adding other columns with RELATED function to find corresponding value on the second table, so that I could use this as completing the third table.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;These two article are helpful to get the columns you like and join them together, but in my case I needed to do something different.&lt;BR /&gt;&lt;BR /&gt;Edit: I found this article, I believe if I digged into this I could've found my solution on your approach as well.&lt;BR /&gt;&lt;A href="https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/" target="_blank"&gt;https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks again!&lt;/P&gt;</description>
    <pubDate>Thu, 15 Aug 2024 20:47:00 GMT</pubDate>
    <dc:creator>brickanalyst</dc:creator>
    <dc:date>2024-08-15T20:47:00Z</dc:date>
    <item>
      <title>I have a sql query that I'd like to code in dax, how can I achieve this?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-have-a-sql-query-that-I-d-like-to-code-in-dax-how-can-I/m-p/4000554#M155833</link>
      <description>&lt;P&gt;Hello there,&lt;BR /&gt;&lt;BR /&gt;Before I come here and ask this question. I asked chatgpt 3.5 to answer my question and I didn't like its answer.&lt;BR /&gt;&lt;BR /&gt;Suppose we have a basic sql query here below:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;SELECT 
	bt.file_hash,
	bt.project_code,
	(y.cat1_cost - bt.cat1_cost ) / bt.cat1_cost AS variance_cat1_cost 
FROM
	bluetable as bt
INNER JOIN yellowtable as y 
ON bt.file_hash = y.file_hash and bt.cat10 = y.cat10
GROUP BY 
	bt.file_hash,
	bt.project_code&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;and I get this answer below:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;EVALUATE
    SUMMARIZECOLUMNS (
        bt[file_hash],
        bt[project_code],
        "variance_cat1_cost",
        DIVIDE ( (SUM ( y[cat1_cost] ) - SUM ( bt[cat1_cost] )), SUM ( bt[cat1_cost] ))
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;and it says you don't have to specificy join condition because power bi it's based on common columns.&lt;BR /&gt;I doesn't make any sense, this is my join and that's how I get unique records.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Can someone explain me or guide me how I can create a calculated table with dax with aggregation included?&lt;BR /&gt;any video, link or code please.&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2024 17:37:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-have-a-sql-query-that-I-d-like-to-code-in-dax-how-can-I/m-p/4000554#M155833</guid>
      <dc:creator>brickanalyst</dc:creator>
      <dc:date>2024-06-19T17:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: I have a sql query that I'd like to code in dax, how can I achieve this?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-have-a-sql-query-that-I-d-like-to-code-in-dax-how-can-I/m-p/4000675#M155882</link>
      <description>&lt;P&gt;The answer you got would rely on a relationship being in place between the two tables.&amp;nbsp;&lt;BR /&gt;Here is a link to an article that explains join functions in DAX.&lt;BR /&gt;&lt;A href="https://www.sqlbi.com/articles/using-join-functions-in-dax/" target="_self"&gt;https://www.sqlbi.com/articles/using-join-functions-in-dax/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and a link to the NATURALINNERJOIN DAX function&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/naturalinnerjoin-function-dax" target="_self"&gt;https://learn.microsoft.com/en-us/dax/naturalinnerjoin-function-dax&lt;/A&gt;&amp;nbsp;&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;&amp;nbsp;Hope this gets you pointed in the right direction.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2024 20:10:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-have-a-sql-query-that-I-d-like-to-code-in-dax-how-can-I/m-p/4000675#M155882</guid>
      <dc:creator>jgeddes</dc:creator>
      <dc:date>2024-06-19T20:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: I have a sql query that I'd like to code in dax, how can I achieve this?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-have-a-sql-query-that-I-d-like-to-code-in-dax-how-can-I/m-p/4103015#M162810</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="430441" data-lia-user-login="jgeddes" class="lia-mention lia-mention-user"&gt;jgeddes&lt;/a&gt;&amp;nbsp;Sorry for late response, I went with sql query so that I couldn load any way that I wanted.&lt;BR /&gt;However, we could do distinct column (mutual) to create a table and adding other columns with RELATED function to find corresponding value on the second table, so that I could use this as completing the third table.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;These two article are helpful to get the columns you like and join them together, but in my case I needed to do something different.&lt;BR /&gt;&lt;BR /&gt;Edit: I found this article, I believe if I digged into this I could've found my solution on your approach as well.&lt;BR /&gt;&lt;A href="https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/" target="_blank"&gt;https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2024 20:47:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-have-a-sql-query-that-I-d-like-to-code-in-dax-how-can-I/m-p/4103015#M162810</guid>
      <dc:creator>brickanalyst</dc:creator>
      <dc:date>2024-08-15T20:47:00Z</dc:date>
    </item>
  </channel>
</rss>

