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