Forum Discussion
negi007
Community Champion
5 years agoImport Max Value Records from Source data
Hi All,
I have one master product table in AWS mysql DB. This table has below column and sample values
Index
Product ID
Value
1
PRD1
20
2
PRD2
40
3
P...
- 5 years ago
here a example of the needed statement:
negi007
Community Champion
5 years agoStefanoGrimaldi Thank you for guiding me in the right direction. I was able to do what I wanted to achieve. Also got to know how we can use native SQL command in powerquery instead of usual m-query language.
Below is the linkon writing SQL queries in powerquery
my final query was similar to below code
select * from ProdctMaster
where ProductMasterID in (SELECT max(ProductMasterID) FROM
ProductMaster GROUP BY ProductName )
StefanoGrimaldi
Resident Rockstar
5 years agograd could help, just keep in mind the more you send over SQL statement the load of that its worked by the datasource not Power BI, so thats a factor to keep in mind when deciding M vs sending query to the source to get the result via SQL.