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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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