Forum Discussion

kwu123's avatar
kwu123
Frequent Visitor
1 year ago
Solved

TMDL: refers to an object which cannot be found

Hi all,   I generate TMDL scripts from PBI report A, and I paste the script to report B, I hope that I can create the same tables (with all its measures, etc)  in report B.   However, when I clic...
  • burakkaragoz's avatar
    1 year ago

    Hi kwu123 ,

     

    Great troubleshooting on your end — you're absolutely right about the root cause.

    The error you're seeing is due to the variation block referencing a relationship GUID that doesn't exist in the target report (Report B). These GUIDs are specific to the model where they were generated, so when you copy TMDL from one report to another, any hardcoded relationship or hierarchy references can break unless the exact same structure exists.

    Here are a few options to handle this:

    1. Remove the variation block
      As you did, removing the variation block avoids the error, but you lose the built-in date hierarchy. This is fine if you don’t need that hierarchy in Report B.

    2. Recreate the relationship manually in Report B
      If you want to preserve the hierarchy, you can:

      • Recreate the same relationship in Report B (between _Sales_WP[opportunity_close_date] and your date table)
      • Then re-export the TMDL from Report B to get the correct relationship ID
      • Use that updated variation block in your script
    3. Use a shared Date Table
      If both reports use the same Date table (e.g., a shared local date table or a custom one), you can standardize the relationship and avoid this issue in future migrations.

    4. Reference Documentation
      Microsoft’s official TMDL docs are still evolving, but you can check this for more on variations and relationships:
      https://learn.microsoft.com/power-bi/transform-model/tmdl/

    Let me know if you want help generating a clean variation block based on your current model.

    If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
    translation and formatting supported by AI