Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi all,
I am new to Power BI and I am trying to get data to create a power BI report via a direct query to a Maria DB. I have two related tables that I would like to join and then import using a specialized SQL query. I could import both tables before joining but I don't feel the need to import all the data just to get rid of most of it. Here's an example simplified scenario. I have two tables posts and comments. I would like to load 1 table with the joined data, using the SQL below, rather than the two tables and then joining and processing them:
SELECT p.id, p.summary, p.view_count, IF(COUNT(c.id) > 0, 'Commented', 'Uncommented') AS status
FROM posts p
LEFT JOIN comments c
ON c.post_id = p.id
WHERE p.deleted_at IS NULL
GROUP BY p.id
I see there is a way to use an SQL query for for direct import for SQL server but I am using MariaDB. Is there a way to do this easily?
Hi @rbermanmw. Go to Power Query Editor ->New Source -> Get Data. In the source select MariaDB.
Enter the credentials
When you load the tables, you will see your SQL query in the formual section, modify that with your desired query and it should work.
@AbhinavJoshi Can you show me a screenshot of the formula section with an SQL query in it?
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
74 | |
73 | |
56 | |
38 | |
31 |
User | Count |
---|---|
83 | |
64 | |
63 | |
49 | |
45 |