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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors