The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi Everyone, I'm exploring the TMDL view and checked the displayfolder function which is super helpful to change folder of multiple measures at a single time, but i'm unable to figure out how we can change the source table of measures using TMDL view. Is there any function or command using which we can change source table of measure using TMDL view
Solved! Go to Solution.
Hi,@anmolmalviya05 .I am glad to help you.
This is my test:
Unfortunately, for the time being, I have not been able to find a command in TMDL View to batch modify the original form names of multiple measures.
I used the createOrReplace command to modify the information for a single measure (created a new measure and renamed it)
In the officially provided documentation, there is currently only the createOrReplace command.
TMDL scripts | Microsoft Learn
Maybe you could achieve a similar effect in other ways: batch change the source table name of the measure to realize the move of the measure to other tables for management.
URL:
Solved: How to move measure from folder to out of folder ? - Microsoft Fabric Community
Or use the modify command in DAX VIEW
The approach is as follows:
Prepare code in Excel: write repetitive DAX code in Excel. Example:
DEFINE
MEASURE 'table'[Measure1] = SUM('Fact_Sales'[quantity])
MEASURE 'table'[Measure2] = SUM('Fact_Sales'[amount])
...
MEASURE 'table'[MeasureN] = SUM('Fact_Sales'[value])
Copy and Paste to DAX Query View window: copy the code from Excel and paste it into Power BI's DAX Query Window. Perform Unified Processing.
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,@anmolmalviya05 .May I ask if you have found the relevant command or code later?
If your problems have been solved correctly (or other ways have been used as alternatives), you can share them. Thank you for your support of Power BI. Good luck with your work.
Best Regards,
Carson Jian
Hi,@anmolmalviya05 .I am glad to help you.
This is my test:
Unfortunately, for the time being, I have not been able to find a command in TMDL View to batch modify the original form names of multiple measures.
I used the createOrReplace command to modify the information for a single measure (created a new measure and renamed it)
In the officially provided documentation, there is currently only the createOrReplace command.
TMDL scripts | Microsoft Learn
Maybe you could achieve a similar effect in other ways: batch change the source table name of the measure to realize the move of the measure to other tables for management.
URL:
Solved: How to move measure from folder to out of folder ? - Microsoft Fabric Community
Or use the modify command in DAX VIEW
The approach is as follows:
Prepare code in Excel: write repetitive DAX code in Excel. Example:
DEFINE
MEASURE 'table'[Measure1] = SUM('Fact_Sales'[quantity])
MEASURE 'table'[Measure2] = SUM('Fact_Sales'[amount])
...
MEASURE 'table'[MeasureN] = SUM('Fact_Sales'[value])
Copy and Paste to DAX Query View window: copy the code from Excel and paste it into Power BI's DAX Query Window. Perform Unified Processing.
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.