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
fhtino
Regular Visitor

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. 
 
Immagine 2024-02-27 101301.png
 
Then I opened the PBIP with Power BI. All the parameters are present. So expressions.local.tmdl has been read correctly. 
 
Immagine 2024-02-27 101557.png
 
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.
 
Immagine 2024-02-27 101642.png
 
Question: is there a way to avoid the merging of different expressions files into a single expressions.tmdl file when saving from Power BI?
 
2 REPLIES 2
lbendlin
Super User
Super User

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.

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

 

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.