<?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: In Need of Help to Convert SQL statement to DAX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-Need-of-Help-to-Convert-SQL-statement-to-DAX/m-p/4247200#M168158</link>
    <description>&lt;P&gt;Thank you.&amp;nbsp; I was hoping to learn how this would translate to DAX - so that I can begin to understand the language and be able to code for myself in the future.&lt;/P&gt;</description>
    <pubDate>Thu, 17 Oct 2024 19:52:47 GMT</pubDate>
    <dc:creator>kkishba2</dc:creator>
    <dc:date>2024-10-17T19:52:47Z</dc:date>
    <item>
      <title>In Need of Help to Convert SQL statement to DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-Need-of-Help-to-Convert-SQL-statement-to-DAX/m-p/4247107#M168147</link>
      <description>&lt;P&gt;I am new to Power BI and DAX.&amp;nbsp; I need assistance converting (learning how to convert) a SQL statement to DAX. The statement below is useful extracting against SSMS, but we have a Semantic Model which pulls in all of the identified tables - and DAX is needed to create the report in PowerBI.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any guidance would be helpful.&amp;nbsp; Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Select W.Wrk + '-' + RIGHT(WS.Sample,2) as SampleID,&lt;BR /&gt;WS.SampleName,&lt;BR /&gt;WS.Sampled,&lt;BR /&gt;CONVERT(VARCHAR(12), SA.nResult) AS ReportedResult,&lt;BR /&gt;SA.Analyte,&lt;BR /&gt;CONVERT(VARCHAR(12),&lt;BR /&gt;SA.Result) AS InitialResult,&lt;BR /&gt;WS.SampledBy,&lt;BR /&gt;Case&lt;BR /&gt;When ws.sampledby = 'adam aleon'&lt;BR /&gt;Then 'AL'&lt;BR /&gt;Else sec.initials&lt;BR /&gt;End As Initials,&lt;BR /&gt;SA.Initials as ReviewedBy,&lt;BR /&gt;se.Status&lt;BR /&gt;From WRK as W&lt;BR /&gt;Inner Join WRKSAMPLE as WS On W.Wrk = WS.Wrk&lt;BR /&gt;Inner Join SAMPLEANALYSIS as SA On WS.Sample = SA.Sample And&lt;BR /&gt;WS.Wrk = SA.Wrk&lt;BR /&gt;Left Join SECURITY as Sec On Sec.Fullname = WS.SampledBy&lt;BR /&gt;left join sampleextraction as se on se.wrk = sa.wrk and se.sample = sa.sample and se.analysis = sa.analysis&lt;BR /&gt;Where W.ProjectNumber = 'p01072' and WS.Sampled &amp;gt;&lt;BR /&gt;--First day of last month&lt;BR /&gt;DATEADD(m,DATEDIFF(m,0,GETDATE())-1,0)&lt;BR /&gt;And WS.Sampled &amp;lt;&lt;BR /&gt;--First day of this month&lt;BR /&gt;DATEADD(ms,-2,DATEADD(month, DATEDIFF(month, 0, GETDATE()), 0))&lt;BR /&gt;And SA.Initials &amp;lt;&amp;gt; ''&lt;BR /&gt;And SA.IsQC = 0&lt;BR /&gt;And WS.SampleName Like 'S%'&lt;BR /&gt;And WS.SampleName Not Like '%A%'&lt;BR /&gt;And WS.SampleName Not Like '%B%'&lt;BR /&gt;And WS.SampleName Not Like 'SPV%'&lt;BR /&gt;And SE.status &amp;lt;&amp;gt; 'cancelled'&lt;BR /&gt;ORDER BY WS.Wrk, WS.Sample, SA.Analyte&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 18:58:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-Need-of-Help-to-Convert-SQL-statement-to-DAX/m-p/4247107#M168147</guid>
      <dc:creator>kkishba2</dc:creator>
      <dc:date>2024-10-17T18:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: In Need of Help to Convert SQL statement to DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-Need-of-Help-to-Convert-SQL-statement-to-DAX/m-p/4247173#M168152</link>
      <description>&lt;P&gt;Why not just create a SQL view of the above statement and feed that as an input to your semantic model ?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 19:41:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-Need-of-Help-to-Convert-SQL-statement-to-DAX/m-p/4247173#M168152</guid>
      <dc:creator>SachinNandanwar</dc:creator>
      <dc:date>2024-10-17T19:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: In Need of Help to Convert SQL statement to DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-Need-of-Help-to-Convert-SQL-statement-to-DAX/m-p/4247181#M168154</link>
      <description>&lt;P&gt;I am very new to this - so I'm not sure what that would look like (adding a view to the semantic model).&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 19:45:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-Need-of-Help-to-Convert-SQL-statement-to-DAX/m-p/4247181#M168154</guid>
      <dc:creator>kkishba2</dc:creator>
      <dc:date>2024-10-17T19:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: In Need of Help to Convert SQL statement to DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-Need-of-Help-to-Convert-SQL-statement-to-DAX/m-p/4247185#M168155</link>
      <description>&lt;P&gt;SQL View in your database.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://en.wikipedia.org/wiki/View_(SQL" target="_blank"&gt;https://en.wikipedia.org/wiki/View_(SQL&lt;/A&gt;)&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 19:47:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-Need-of-Help-to-Convert-SQL-statement-to-DAX/m-p/4247185#M168155</guid>
      <dc:creator>SachinNandanwar</dc:creator>
      <dc:date>2024-10-17T19:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: In Need of Help to Convert SQL statement to DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-Need-of-Help-to-Convert-SQL-statement-to-DAX/m-p/4247200#M168158</link>
      <description>&lt;P&gt;Thank you.&amp;nbsp; I was hoping to learn how this would translate to DAX - so that I can begin to understand the language and be able to code for myself in the future.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 19:52:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-Need-of-Help-to-Convert-SQL-statement-to-DAX/m-p/4247200#M168158</guid>
      <dc:creator>kkishba2</dc:creator>
      <dc:date>2024-10-17T19:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: In Need of Help to Convert SQL statement to DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-Need-of-Help-to-Convert-SQL-statement-to-DAX/m-p/4247209#M168160</link>
      <description>&lt;P&gt;Thats great but unforutanetly&amp;nbsp;at the first sight the SQL query looks to complicated to be converted to DAX .There are 4 tables involved with multiple joins with to many predicates.If its me I would stick to SQL View approach.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if you still would like to try the DAX way, then post the semantic model,the business rules and the sample data here.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 19:59:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-Need-of-Help-to-Convert-SQL-statement-to-DAX/m-p/4247209#M168160</guid>
      <dc:creator>SachinNandanwar</dc:creator>
      <dc:date>2024-10-17T19:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: In Need of Help to Convert SQL statement to DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-Need-of-Help-to-Convert-SQL-statement-to-DAX/m-p/4247458#M168167</link>
      <description>&lt;P&gt;selectdax.in&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2024 02:26:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/In-Need-of-Help-to-Convert-SQL-statement-to-DAX/m-p/4247458#M168167</guid>
      <dc:creator>dvraan</dc:creator>
      <dc:date>2024-10-18T02:26:42Z</dc:date>
    </item>
  </channel>
</rss>

