<?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: Convert SQL Query to DAX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-SQL-Query-to-DAX/m-p/3803414#M148707</link>
    <description>&lt;P&gt;Hi&amp;nbsp;@lbendlinm, I don't know how&amp;nbsp; to do that you are suggesting..matrix visual? I don't have yet the 1:1 relationship, that's I'm pretending converting the Sql query to a Dax and put the result into a Calculated table.&lt;/P&gt;&lt;P&gt;For now, only I have is this table:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;This is not a 1:1 reationship, because I have 2 or more records by each Contact ID, I need only one record by each contact ID.&amp;nbsp; Could I do that just using matrix visual?&amp;nbsp; Could you please explain me further how to do that? I'm not super expert on Power Bi, so I'm trying to solve it, but any possible solution so far.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Further details about your solution with Matrix visual based in my screeshot examples above would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 02 Apr 2024 02:38:50 GMT</pubDate>
    <dc:creator>rmbernal</dc:creator>
    <dc:date>2024-04-02T02:38:50Z</dc:date>
    <item>
      <title>Convert SQL Query to DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-SQL-Query-to-DAX/m-p/3795126#M148315</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Does anyone know how I would convert this SQL case statement to DAX (see below)?&amp;nbsp; &amp;nbsp;Any help would be very much appreciated&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;select distinct c.[crm_as_Contact] as contactid,&lt;BR /&gt;( select b.Otherval from testingAos_File b ,dim_person p where b.crm_as_Contact=p.ContactId and b.Level_of_Expertise ='Primary Expertise' and b.crm_as_Contact=c.crm_as_Contact ) as Prim_exp,&lt;BR /&gt;( select b.Otherval from testingAos_File b ,dim_person p where b.crm_as_Contact=p.ContactId and b.Level_of_Expertise ='Intermediate Expertise' and b.crm_as_Contact=c.crm_as_Contact ) as Interm_exp,&lt;BR /&gt;( select b.Otherval from testingAos_File b ,dim_person p where b.crm_as_Contact=p.ContactId and b.Level_of_Expertise ='Advanced Expertise' and b.crm_as_Contact=c.crm_as_Contact ) as Adv_exp&lt;BR /&gt;from testingAos_File c&lt;BR /&gt;where c.crm_as_Contact in (select contactid from Dim_Person)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Further details here:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 1 Power Bi report, using a data model, I have person table and this calculated table as source:&lt;/P&gt;&lt;P&gt;Calculated table:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I have more than one record by contact ID on the calculated table above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here example of my Person table:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Here I need: &lt;STRONG&gt;I'm expecting to see only 1 record by contact ID&lt;/STRONG&gt; using level expertise as column for each one (Primary, Intermediate and Advanced)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Translating my sql query to DAX for creating a new table, here I'm expecting to see on that new table:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since relationship with Person table would be one to one, I could add columns of Prim_exp, interm_exp and Adv_exp only joining by contact ID what is my businness need.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this help better to explain what I'm looking for. Any help of you would be gretly appretiated&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2024 19:59:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-SQL-Query-to-DAX/m-p/3795126#M148315</guid>
      <dc:creator>rmbernal</dc:creator>
      <dc:date>2024-03-28T19:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SQL Query to DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-SQL-Query-to-DAX/m-p/3795338#M148333</link>
      <description>&lt;P&gt;- Forget SQL&lt;/P&gt;
&lt;P&gt;- Describe your business problem&lt;/P&gt;
&lt;P&gt;- Provide sample data&lt;/P&gt;
&lt;P&gt;- indicate the expected outcome based on the sample data.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2024 01:02:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-SQL-Query-to-DAX/m-p/3795338#M148333</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-03-28T01:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SQL Query to DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-SQL-Query-to-DAX/m-p/3797574#M148418</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;please see my updated post abocve, I already added further information as you suggested. Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2024 20:01:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-SQL-Query-to-DAX/m-p/3797574#M148418</guid>
      <dc:creator>rmbernal</dc:creator>
      <dc:date>2024-03-28T20:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SQL Query to DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-SQL-Query-to-DAX/m-p/3797764#M148435</link>
      <description>&lt;P&gt;Sounds like you can do this entirely in the UI, via the matrix visual.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1:1&amp;nbsp; relationships are usually an indication that tables can be combined into one.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2024 22:43:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-SQL-Query-to-DAX/m-p/3797764#M148435</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-03-28T22:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SQL Query to DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-SQL-Query-to-DAX/m-p/3803414#M148707</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@lbendlinm, I don't know how&amp;nbsp; to do that you are suggesting..matrix visual? I don't have yet the 1:1 relationship, that's I'm pretending converting the Sql query to a Dax and put the result into a Calculated table.&lt;/P&gt;&lt;P&gt;For now, only I have is this table:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;This is not a 1:1 reationship, because I have 2 or more records by each Contact ID, I need only one record by each contact ID.&amp;nbsp; Could I do that just using matrix visual?&amp;nbsp; Could you please explain me further how to do that? I'm not super expert on Power Bi, so I'm trying to solve it, but any possible solution so far.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Further details about your solution with Matrix visual based in my screeshot examples above would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 02:38:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-SQL-Query-to-DAX/m-p/3803414#M148707</guid>
      <dc:creator>rmbernal</dc:creator>
      <dc:date>2024-04-02T02:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SQL Query to DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-SQL-Query-to-DAX/m-p/3805770#M148808</link>
      <description>&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;&lt;BR /&gt;Do not include sensitive information or anything not related to the issue or question. &lt;BR /&gt;&lt;BR /&gt;If you are unsure how to upload data please refer to &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 19:29:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-SQL-Query-to-DAX/m-p/3805770#M148808</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-04-02T19:29:38Z</dc:date>
    </item>
  </channel>
</rss>

