cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
fguijarrob
Frequent Visitor

How to work with monthly mysql tables for a bars visualization(one bar per month

Hello,

I have one mysql table for each month with similar table name: tablejan, tablefeb, tabmar, tableapr....

How can I manage the visualizacion to get data from each monthly table to visualize a stuck graph with one column per month?

Thank you for your help

1 ACCEPTED SOLUTION
daXtreme
Super User
Super User

Create a view that UNION's all the tables (if they have different structures you'll need to make them similar but it's easy to do in the view's definition). Such a view should be imported into Power BI. To refer to the data of a particular table, you can have a column inside the view that tells you which table the data comes from. Then to do what you want it's just a matter of proper filtering put on the imported table. In general, having myriads of tables with the same structure is not what Power BI likes. Try to always standardize.

View solution in original post

1 REPLY 1
daXtreme
Super User
Super User

Create a view that UNION's all the tables (if they have different structures you'll need to make them similar but it's easy to do in the view's definition). Such a view should be imported into Power BI. To refer to the data of a particular table, you can have a column inside the view that tells you which table the data comes from. Then to do what you want it's just a matter of proper filtering put on the imported table. In general, having myriads of tables with the same structure is not what Power BI likes. Try to always standardize.

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Top Solution Authors
Top Kudoed Authors