Forum Discussion

fhtino's avatar
fhtino
Regular Visitor
2 years ago

Multiple expressions.tmdl

I'm playing around with Power BI Desktop PBIP projects and TMDL files. I store them on a GIT repository. Using GIT allows different developers to work together. Among other things, the expressions.tmdl file contains the parameters. Like this one:
 
expression MyLocalPath = "c:\testfolder\data\" meta [IsParameterQuery=true, Type="Text", IsParameterQueryRequired=true]
lineageTag: 10b71067-5bc0-4a58-a39d-b8f181356a4f
annotation PBI_NavigationStepName = Navigation
annotation PBI_ResultType = Text
 
The parameter contains a local disk path. As you can guess, the value is different among the developers. E.g. I have data under "c:\testfolder\data\" and another dev could have data under "e:\anotherfolder".
 
I would like to find a way to ignore the value of the parameter when I commit the tmdl file to GIT. This brings me to consider .gitignore file. But I do not want to ignore the full expressions.tmdl file. So I did a test. I created another tmdl file, named expressions.local.tmdl and moved the MyLocalPath parameter from expressions.tmdl to expressions.local.tmdl. Then I added expressions.local.tmdl to the .gitignore file. 
 
 
Then I opened the PBIP with Power BI. All the parameters are present. So expressions.local.tmdl has been read correctly. 
 
 
But when I saved the project from PowerBI, the file expressions.local.tmdl has been canceled and the parameter has been moved back to expressions.tmdl file and expressions.local.tmdl deleted.
 
 
Question: is there a way to avoid the merging of different expressions files into a single expressions.tmdl file when saving from Power BI?
 

3 Replies

  • Great idea.  See if you can get Matthias' attention.

     

    If this is important to you please consider voting for an existing idea or raising a new one at https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41

     

    Note:  Parameters and Expressions are NOT the same thing.  Expressions are all the artefacts that are not Partitions (which are loaded into VertiPaq).

     

    Note2:  Parameters pointing to local folders will be useless in the service anyway.

    • fhtino's avatar
      fhtino
      Regular Visitor

      Sorry for the confusion about Parameters and Expressions. I am a Power BI basic user struggling to find a way to store power bi projects under GIT.


      Local paths: yes, you are right. Absolutely not useful in the service but very important for local activities, in particular during development phases if more than one dev works on the same project, or same dev from different PC. Apart from paths, there could be other parameters tied to local settings. So an "externalization" feature, at least only just for parameters, would be very useul.

       

      Idea: https://ideas.fabric.microsoft.com/ideas/idea/?ideaid=b467731c-fdd5-ee11-92bd-000d3a0f7b2e

       

  • Voted on this idea!

    If all queries on Power Query would be generated alone (loaded and not loaded), this would be wonderfull. So we could add them to .gitignore
    Also a better and more organized way to represent report visuals would be wonderfull too.

    Can't wait for the PBIB updates!
    All this is too much important!