Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213819

In a dire need for help - result based on a subquery (max)

$
0
0

Hello,

 

I'm using the PowerBI desktop version and trying to convert a code from SQL to Power Query.

I Need to filder the result of a table in the query editor the SQL query is:

select wf.projectname,wf.StageName
  from MS_Workflow wf
  where
  wf.StageEntryDate = (select max(wf2.StageEntryDate) from MS_Workflow wf2 where wf.projectid = wf2.ProjectId)
  group by wf.ProjectName,StageName
  order by StageName desc
I need to be able to het the latest entry date for each projectID.

I have merged the table to iteslf to create a self-join but not sure how to convert this sub-query.

 

Thanks in Advance!

 


Viewing all articles
Browse latest Browse all 213819

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>