Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Now im use thsi formula
let
Source1 = Sybase.Database(SelectServer, SelectDatabase1),
DBA_view_DidknObj1 = Source1{[Schema="DBA",Item="view_DidknObj"]}[Data],
Source2 = Sybase.Database(SelectServer, SelectDatabase2),
DBA_view_DidknObj2 = Source2{[Schema="DBA",Item="view_DidknObj"]}[Data],
Append = Table.Combine( {DBA_view_DidknObj1, DBA_view_DidknObj2} ),
#"Sorted Rows" = Table.Sort(Append,{{"OPE_ID", Order.Ascending}})
in
#"Sorted Rows"
But i have about 100 sources wich dinamically changes, it is possible this part
Source1 = Sybase.Database(SelectServer, SelectDatabase1),
DBA_view_DidknObj1 = Source1{[Schema="DBA",Item="view_DidknObj"]}[Data],
take from text file which i will generate with other tool, or PBi can do that for me? for example take list of databases from txt file and loop throught them?
@Analitika , The information you have provided is not making the problem clear to me. Can you please explain with an example.
If you have same file. You can merge them and apply transformation
https://powerbi.microsoft.com/en-us/blog/combining-excel-files-hosted-on-a-sharepoint-folder/
Appreciate your Kudos.
I have text or excel file
IP | Dbname
100.11.11.23 | db1
100.10.110.20 | db2
100.101.111.03 | db3
100.1.101.11 | db4
i need this file convert to
let
Source1 = Sybase.Database("100.11.11.23", "db1"),
DBA_view_DidknObj1 = Source1{[Schema="DBA",Item="view_DidknObj"]}[Data],
Source2 = Sybase.Database("100.10.110.20", "db2"),
DBA_view_DidknObj2 = Source2{[Schema="DBA",Item="view_DidknObj"]}[Data],
Source3 = Sybase.Database("100.101.111.03", "db3"),
DBA_view_DidknObj3 = Source3{[Schema="DBA",Item="view_DidknObj"]}[Data],
Source4 = Sybase.Database("100.1.101.11", "db4"),
DBA_view_DidknObj4 = Source4{[Schema="DBA",Item="view_DidknObj"]}[Data],
Append = Table.Combine( {DBA_view_DidknObj1, DBA_view_DidknObj2, DBA_view_DidknObj3, DBA_view_DidknObj4} ),
#"Sorted Rows" = Table.Sort(Append,{{"OPE_ID", Order.Ascending}})
in
#"Sorted Rows"
now i need do same thing with 100 sources
This is a good use of a custom function. Here is how to approach this.
1. Make a table with your 100 sets of values (IP and database name). Set both to Text data type.
2. Make a custom function like this one (make a blank query and paste this M code over the existing code in the Advanced Editor). Call it something like fxData
(ipnumber, dbase) =>
let
Source = Sybase.Database(ipnumber, dbase),
DBA_view = Source{[Schema="DBA",Item="view_DidknObj"]}[Data]
in
DBA_view
3. On your first table, on Add Column tab click on Invoke Custom Function. Choose fxData (or whatever you called it), and select the correct two columns as input.
4. At this point you should have a table of 100 tables. Simply click the expand button on the top of the tables column to expand and combine all the data.
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Hi @Analitika ,
You requirement is not clear. Add details please.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Thanks,
Pragati
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 35 | |
| 34 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 137 | |
| 102 | |
| 68 | |
| 66 | |
| 64 |