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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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?
 
3 REPLIES 3
bluedatenbrian
Advocate II
Advocate II

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! 

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

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