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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
DenisChe
Frequent Visitor

Store a Stucture changes of Dataset Using Git

I'm trying to store and track the huge and frequently changing structure of Power BI Dataset (not data) using Git.

Right now it's a text or .MD formatted document where all Power Query queries (manually copy-pasted one by one) are stored. All measures also are imported using DAX Studio and written at the end.

Briefly, it looks like this:

* Custom Functions
    * ExtractJsonFileContent
      let
          Source = (fileContent) =>
      let
      Source = Json.Document(fileContent)
      in
      Source
      in
          Source
    * Countries
      let
          Source = Json.Document(DS{[Name="lookups"]}[Content]{[Name="Countries.json"]}[Content],65001),
          #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
---
          #"Sorted Rows" = Table.Sort(#"Changed Type",{{"Country", Order.Ascending}}),
          #"Added Index" = Table.AddIndexColumn(#"Sorted Rows", "heapCountryId", 1, 1, Int64.Type)
      in
          #"Added Index"    

DEFINE 
---- MODEL MEASURES BEGIN ----

MEASURE 'Some Table'[Fail Rate_Int] = 
    DIVIDE(
        [Total Failed Tickets_Int],
        [Total Created Tickets_Int]
        )
MEASURE 'Some Table'[Success Rate] = 1 - [Fail Rate_Int]
---- MODEL MEASURES END ----

Maybe there is a more effective way to store these structures?

And one more question: How to store the relations between tables and measures?

1 REPLY 1
MattiaFratello
Super User
Super User

Hi @DenisChe, have you tried to use TMDL yet?

 

https://www.youtube.com/live/cosXZw0GcRU

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.