PowerBI Reports on Matomo data from MySQL database

Hello,

does anybody have some experience with reports creating in PowerBI using data from the Matomo MySQL database? I’m a beginner in using PowerBI and MySQL databases, I studied Matomo database schema (https://developer.matomo.org/guides/database-schema), but I’m still unsure how to, for example, find out visits per specific month. Could anybody please help me to start with that?

Thank You!

Hi @Radoslava_Kacova

SELECT *
FROM matomo_log_visit
WHERE visit_last_action_time >= DATE_FORMAT( CURRENT_DATE - INTERVAL 1 MONTH, '%Y/%m/01' )
  AND visit_last_action_time < DATE_FORMAT( CURRENT_DATE, '%Y/%m/01' )
  AND idsite in (SELECT idsite FROM matomo_site WHERE name LIKE '%PRODUCTION%'); -- to include only some sites for example

Hello, how did you make the process to use MySQL with Matomo in Power BI?

To find visits per specific month from your Matomo MySQL database, you’ll need to connect PowerBI to your database and write SQL queries to retrieve the data. For example, you can use a query to extract visit counts grouped by month. Import the results into PowerBI and create visualizations like line or bar charts to represent the data.

1 Like