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
swemerald
New Member

querying tables that are created monthly as one table (a phone PBX)

Afternoon

I have powerBI reporting on a phone system.

Data is a MYSQL database which my power BI connects to.

Teh PBX platform is from a company called "yeastar"

Issue is however each month this phone system reates a new table - I cant control or change this.

 

My Power BI connects to 1 month table and all works fine, however i cant then see data for another month because its in another table. Every month a new table is created I have to make a new Power BI project and connect to that new table.

 

Any ideas ,

- can i get the tablename as a wildcard follwed by the fields?

- Do i need another SQL server to use as a "transition" so it queries all these table then presents 1 large table to Power BI

 

Screen shot shows the database im querying

 

Thanks in advance2021-09-23.png

2 REPLIES 2
amitchandak
Super User
Super User

@swemerald , You can change the table in power bi source. Right click on table in power query, open advance editor.

In source replace table name

 

refer if needed

How to Change Connection Details https://www.youtube.com/watch?v=59PUFuuCrbY

Thankyou for response, i have looed at the video, This changing datasources.

"changing data sources" and saving a new pbix every month is what i am currently doing.

 

All these differnt tables on the MYSQL are identiacal in structure (differnt data within)

Just we have 1 table per month

 

I want to query all these tables as if they were 1 big table

Each new month a new table will appear, i then need that adding (hence im asking can i wildcard the table name some how?)

 

 

let
Source = MySQL.Database("xxxx.yxxxr.cloud:9999", "cdr", [ReturnSingleDatabase=true]),
cdr_cdr_202106 = Source{[Schema="cdr",Item="cdr_202106"]}[Data]
in
cdr_cdr_202106

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.