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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
jaryszek
Impactful Individual
Impactful Individual

How to move entire Measure Table in Datalake On OneLake?

Hello,

I want to move all measures in my Measure table into OneLake model from Import Mode report.
how to do this without using Semantic Labs?

Best,
Jacek

1 ACCEPTED SOLUTION
DataNinja777
Super User
Super User

Hi @jaryszek ,

 

Yes, you can absolutely move an entire measure table from a Power BI Import Mode report to a OneLake model without Semantic Link. The most common methods involve using external tools or the DAX Query View feature within Power BI Desktop.

 

One of the most efficient ways is by using Tabular Editor. You would start by opening two instances of Tabular Editor. Connect the first instance to your local Power BI Desktop file and the second instance to your Direct Lake semantic model using its XMLA endpoint. In the instance connected to your local file, navigate to your measure table, select all the measures you wish to move, and copy them. Then, switch to the instance connected to your Direct Lake model, select the destination table, and simply paste the measures. After pasting, save the changes back to the Power BI service to finalize the process.

 

Alternatively, you can use the DAX Query View directly within Power BI Desktop. First, open the Import Mode report that contains your measures. Switch to the DAX Query View, find your measure table in the Data pane, right-click it, and select "Define all measures in this table." This action will generate a DAX script containing the definitions for all the measures in that table.

DEFINE
  TABLE 'YourMeasureTableName' =
    ADDCOLUMNS(
      KEEPFILTERS(
        FILTER(
          VALUES('YourMeasureTableName'[Measure]),
          NOT(ISBLANK('YourMeasureTableName'[Measure]))
        )
      ),
      "Expression",
      VAR vMeasure = 'YourMeasureTableName'[Measure]
      RETURN
        SWITCH(
          vMeasure,
          "Total Sales", [Total Sales],
          "Sales YTD", [Sales YTD],
          "Profit Margin", [Profit Margin]
          // ... and so on for all your measures
        )
    )

EVALUATE
  'YourMeasureTableName'

Copy this entire generated script. Next, open a new Power BI Desktop file and create a live connection to your Direct Lake semantic model. Go to the DAX Query View in this new file, paste the script you copied, and run it. This will create all the measures in your Direct Lake model. Remember to save and publish the file to apply the changes in the service.

 

For a more automated, code-driven solution, you can use PowerShell. This advanced method involves saving your .pbix file as a .pbit template, renaming it to a .zip file, and extracting its contents. Inside, you'll find the DataModelSchema JSON file, which contains all the model metadata. You can write a PowerShell script to parse this JSON file to extract the measure names and their DAX expressions. Finally, using the Tabular Object Model (TOM) library in PowerShell, you can connect to your Direct Lake model and programmatically create each of the extracted measures.

 

Best regards,

View solution in original post

3 REPLIES 3
v-tsaipranay
Community Support
Community Support

Hi @jaryszek ,

Thank you for reaching out to the Microsoft fabric community forum. thank you @DataNinja777  for your helpful response.

 

Thank you for confirming the steps you’ve taken and providing the error message. The “Cannot find table <oii>MeasureTable</oii>” error occurs because your Direct Lake semantic model doesn’t yet have a dedicated Measure Table. To proceed with moving or pasting your measures, please create this table within your Lakehouse model first.

You can do this directly in Power BI Desktop by following these steps:

  • Open your Direct Lake model in Power BI Desktop, navigate to Model View, and select New Table.
  • Use the following DAX expression to create an empty placeholder table:
MeasureTable = DATATABLE("Placeholder", STRING, { { "" } })

This creates a single-column dummy table that acts as a container.

  • After the table is created, rename it (e.g., “Measure Table”) and hide the placeholder column from report view. Now you can paste or move your measures into this new Measure Table using the DAX script generated earlier or by manually copying from Tabular Editor.

Once done, your Direct Lake model will contain the same measure structure as your Import Mode report, and you’ll be able to proceed with the migration smoothly.

Hope this helps, please feel free to reach out for any further questions.

 

Thank you.

DataNinja777
Super User
Super User

Hi @jaryszek ,

 

Yes, you can absolutely move an entire measure table from a Power BI Import Mode report to a OneLake model without Semantic Link. The most common methods involve using external tools or the DAX Query View feature within Power BI Desktop.

 

One of the most efficient ways is by using Tabular Editor. You would start by opening two instances of Tabular Editor. Connect the first instance to your local Power BI Desktop file and the second instance to your Direct Lake semantic model using its XMLA endpoint. In the instance connected to your local file, navigate to your measure table, select all the measures you wish to move, and copy them. Then, switch to the instance connected to your Direct Lake model, select the destination table, and simply paste the measures. After pasting, save the changes back to the Power BI service to finalize the process.

 

Alternatively, you can use the DAX Query View directly within Power BI Desktop. First, open the Import Mode report that contains your measures. Switch to the DAX Query View, find your measure table in the Data pane, right-click it, and select "Define all measures in this table." This action will generate a DAX script containing the definitions for all the measures in that table.

DEFINE
  TABLE 'YourMeasureTableName' =
    ADDCOLUMNS(
      KEEPFILTERS(
        FILTER(
          VALUES('YourMeasureTableName'[Measure]),
          NOT(ISBLANK('YourMeasureTableName'[Measure]))
        )
      ),
      "Expression",
      VAR vMeasure = 'YourMeasureTableName'[Measure]
      RETURN
        SWITCH(
          vMeasure,
          "Total Sales", [Total Sales],
          "Sales YTD", [Sales YTD],
          "Profit Margin", [Profit Margin]
          // ... and so on for all your measures
        )
    )

EVALUATE
  'YourMeasureTableName'

Copy this entire generated script. Next, open a new Power BI Desktop file and create a live connection to your Direct Lake semantic model. Go to the DAX Query View in this new file, paste the script you copied, and run it. This will create all the measures in your Direct Lake model. Remember to save and publish the file to apply the changes in the service.

 

For a more automated, code-driven solution, you can use PowerShell. This advanced method involves saving your .pbix file as a .pbit template, renaming it to a .zip file, and extracting its contents. Inside, you'll find the DataModelSchema JSON file, which contains all the model metadata. You can write a PowerShell script to parse this JSON file to extract the measure names and their DAX expressions. Finally, using the Tabular Object Model (TOM) library in PowerShell, you can connect to your Direct Lake model and programmatically create each of the extracted measures.

 

Best regards,

thank you. 

The best way to be move Measure Table using DAX queries. 
I reproduced the steps. 

The issue is that while i am copying my dax measures i am getting error:

jaryszek_0-1757317289844.png


How to create a Measure Table in my LakeHouse model?

Best,
Jacek

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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