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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors