Forum Discussion
New to BI. Writing SQL queries to parse data. I am obviously missing something.
Quick question to make sure I'm not just assuming: you are using the Power BI Desktop program and not just the Power BI website service right?
desktop
- arify10 years ago
Microsoft Employee
If you want to write your SQL queries, it's pretty simple:
However, like KHorseman said, our software does handle a lot of query operations (filter, join, distinct, groupby etc.) you do with buttons and turn them into SQL queries :)
- aspardo10 years agoRegular Visitor
Thank you for these detailed responses. I really do appreciate it.
1) I put the database credentials into the the screenshotted area that you linked. I write the query into the SQL statement area, but not in regular SQ, but Power Query Formula Language?
2) Once that information is pulled into BI I am unable to change the query structure and get new data and I have to start the process over? In other words, I get to put the query in once and go with that.
3) I assume the query can link multiple tables together? Such as SELECT * FROM customers LEFT JOIN account.customer_id_=customers.id WHERE customers. id > 1000
4) KHorseman mentioned that BI can handle a lot of query operations. What potential benefits are there in using the buttons instead of writing the query and getting the exact data I need?
- anithat10 years ago
Resolver II
Hi aspardo
In the Advanced query options write the query in the format that your database accepts. No need to modify it as per the powerBI format.
In general, You might be using some third party tool to execute your queries and check the data. Use the same query in same format - just COPY and PASTE that query in power BI desktop Advanced query options.
PowerBI converts it into its readable format.
Further, at any point if you want to change the query, then
1> Go to Edit Queries
2> Choose the query
3> On the right hand side Double click the 'Source' under Applied Steps
4> Modify the query
5> Save
If you have any further issues, please let me know.
- tfamutimi4 years agoNew Member
How can I do this when joining tables from 2 different databases
- Anonymous10 years agoNot applicable
OK. The online service is pretty restricted as far as writing complex queries and measures. I just wanted to make sure that you were in the right place to see the tools I was describing.