Coder Social home page Coder Social logo

m-kovalsky / modelautobuild Goto Github PK

View Code? Open in Web Editor NEW
51.0 13.0 17.0 1.35 MB

A framework for dynamically creating a tabular model based on an Excel template.

License: MIT License

C# 100.00%
tabular dax analysis-services-tabular analysis-services powerbi tabulareditor

modelautobuild's People

Contributors

m-kovalsky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

modelautobuild's Issues

Calculated Column - Not removing quotes from the DAX Expression

If a calculated column is such that the DAX code generates a quoted string it will not be removed by the ModelAutoBuild.cs file.
The ModelAutoBuildExample.xlsx works because the one calculated column is a simple SUM without anything that would generate a quoted string. But as soon as I create a Calculated Column such as a PATH(id, parent_Id) or a CALCULATE as soon as the comma is added it generates a quoted string.

The current code only removes the quotes from the measures.

One workaround I am using is to remove the quotes in the same else block that creates the Calculated Column. Or else I would need to do it similar to the Measure code and iterate through each Calculated Column.
Note: I know the best method is to not create calculated columns and push that down to the database layer

FormatDAX Deprecated in Tabular Editor Version 2.13.0

With the new version of Tabular Editor 2.13.0 the FormatDax method has been deprecated.
https://docs.tabulareditor.com/FormatDax.html
This is in an effort to reduce the workload on the Dax Formatter site.
The proposed solution is to use alternative syntax such as FormatDax(Model.AllMeasures); so that it is done in a single request.

When enabling DAX Formatting in the Model Auto Build with the new Tabular Editor it does generate this message:

Script warning: This script is making multiple calls to the "FormatDax" method, which has been deprecated! Calls will be throttled to not overload the DaxFormatter.com service. To avoid throttling, please change your script to use the FormatDax extension method going forward. For more information, see: https://docs.tabulareditor.com/FormatDax.html

Model Permission

The C# script does not support the Model Permission of Refresh and ReadRefresh. Unless this is to enforce best practices it would be helpful to have these permissions.

As a workaround, I have added it manually to the script file.

Calculation Groups

Do you have plans to extend this to include Calculation Groups? Would love to see this feature.

Missing Decimal FormatString for Measures

It is present for columns but not for measures.

BTW The way the code is written makes this project so extensible. If it fits my client's needs I could add more types like Decimal_OnePlace and Decimal_TwoPlace depending on how many decimal places they wanted to see by default.

Auto-Generate Relationship fails if similar named dimension table

There currently was an existing Dimension named ServiceRouteMaster related to ServiceRouteMasterId in the current model.

For testing purposes I created a test column in the Fact Table named TestServiceRouteMasterId and another dimension table with the name of TestServiceRouteMaster. When I went to build this I got error messages about ambiguous paths. After creating some debug outputs I was able to determine that for the new dimension table it was getting the correct column from the fact table TransactionLines.TestServiceRouteMasterId but for the dimension it was using ServiceRouteMaster.ServiceRouteMasterId.

I determined this was due to it matching the same EndsWith pattern since it read the original ServiceRouteMaster column first.

var dim = Model.Tables.FirstOrDefault(t => factColumn.Name.EndsWith(t.Name + keySuffix));

If I switch it to use Equals(t.Name + keySuffix)); it builds the correct relationship.

Could see this happening if someone had Location and CustLocation or StoreLocation.

Can v1.4 be run from command line

I have not made the jump to v1.4. Waiting for time to test.

Can you still run the process from the command line without pasting the script in Tabular Editor?

I currently use a Powershell script to automate the build and deploy process.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.