Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

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
Solution Sage
Solution Sage

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
Solution Sage
Solution Sage

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
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.