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
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?

0 REPLIES 0

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.