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
kana
Helper I
Helper I

How to union dbase files into 1 query and also a custom column

Dear All Master

With this I want the UNION database to be 1 query in the power query. I already used union in the connection string but I can't custom the columns for each dbf table. What I want as follows:

  1. in the BOJ folder with the database name IFG.DBF I want to custom the column with the name DEPT and the contents of the column is "BOJ", in the M18 folder with the database name IFG.DBF I want to custom the column with the name DEPT and the contents of the column are "M18", in the MD2 folder with the database name IFG.DBF I want to custom the column with the name DEPT and the contents of the column are "MD2".
  2. Can I union to the first point with a different DBF database (STF.DBF in each folder)
  3. I want a function of the M code language to speed up database loading because database records are in the hundreds of thousands.
  4. I hereby attach the sample file link: https://drive.google.com/open?id=1wyCZuaAUBeXDVksp7Wt1St1ITEpciIk_

 

let
    Source = Odbc.Query("dsn=dBASE Files", "Select * From C:\Test\mytest\m18\IFG.DBF Union Select * From C:\Test\mytest\boj\IFG.DBF Union Select * From C:\Test\mytest\md2\IFG.DBF#(lf)"")")
in
    Source

 

16 REPLIES 16

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