We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I get the error message as per the title for EvaluateDax or ExecuteDax when running code like the below. Code works in TE2.
EvaluateDax
// https://github.com/microsoft/Analysis-Services/tree/master/BestPracticeRules int maxLen = 100; string annName = "LongLengthRowCount"; foreach (var c in Model.AllColumns.Where(a => a.DataType == DataType.String)) { string tableName = c.Table.Name; string columnName = c.Name; var obj = Model.Tables[tableName].Columns[columnName]; var result = EvaluateDax("SUMMARIZECOLUMNS(\"test\",CALCULATE(COUNTROWS(DISTINCT('"+tableName+"'["+columnName+"])),LEN('"+tableName+"'["+columnName+"]) > "+maxLen+"))"); obj.SetAnnotation(annName,result.ToString()); if (obj.GetAnnotation(annName) == "Table") { obj.SetAnnotation(annName,"0"); } }
ExecuteDax
// https://github.com/microsoft/Analysis-Services/tree/master/BestPracticeRules // Split Date/Time recommendation string annName = "DateTimeWithHourMinSec"; foreach (var c in Model.AllColumns.Where(a => a.DataType == DataType.DateTime)) { string columnName = c.Name; string tableName = c.Table.Name; var obj = Model.Tables[tableName].Columns[columnName]; var result = ExecuteDax("EVALUATE TOPN(5,SUMMARIZECOLUMNS('"+tableName+"'["+columnName+"]))").Tables[0]; for (int r = 0; r < result.Rows.Count; r++) { string resultValue = result.Rows[r][0].ToString(); if (!resultValue.EndsWith("12:00:00 AM")) { obj.SetAnnotation(annName,"1"); r=50; } else { obj.SetAnnotation(annName,"0"); } } }
The text was updated successfully, but these errors were encountered:
Fixed in 3.0.6.
Sorry, something went wrong.
No branches or pull requests
I get the error message as per the title for EvaluateDax or ExecuteDax when running code like the below. Code works in TE2.
EvaluateDax
ExecuteDax
The text was updated successfully, but these errors were encountered: