From ff90f82f340816ada764849fc775f738d3416535 Mon Sep 17 00:00:00 2001 From: John Kerski <85596845+kerski@users.noreply.github.com> Date: Thu, 1 Feb 2024 21:33:29 -0500 Subject: [PATCH 1/6] Update BPARules.json Update to description of "Provide format string for Date columns --- BestPracticeRules/BPARules.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BestPracticeRules/BPARules.json b/BestPracticeRules/BPARules.json index c8aa0024..1f350670 100644 --- a/BestPracticeRules/BPARules.json +++ b/BestPracticeRules/BPARules.json @@ -593,7 +593,7 @@ "ID": "DATECOLUMN_FORMATSTRING", "Name": "[Formatting] Provide format string for \"Date\" columns", "Category": "Formatting", - "Description": "Columns of type \"DateTime\" that have \"Month\" in their names should be formatted as \"mm/dd/yyyy\".", + "Description": "Columns of type \"DateTime\" that have \"Date\" in their names should be formatted as \"mm/dd/yyyy\".", "Severity": 1, "Scope": "DataColumn, CalculatedColumn, CalculatedTableColumn", "Expression": "Name.IndexOf(\"Date\", \"OrdinalIgnoreCase\") >= 0 \r\nand \r\nDataType = \"DateTime\" \r\nand \r\nFormatString <> \"mm/dd/yyyy\"", @@ -724,4 +724,4 @@ "Expression": "Name.ToUpper().Contains(\"MONTH\")\r\nand\r\n! Name.ToUpper().Contains(\"MONTHS\") \r\nand \r\n\n\nDataType == DataType.String \r\nand \r\nSortByColumn == null", "CompatibilityLevel": 1200 } -] \ No newline at end of file +] From 8db4001d86403d840c72d6689cf896ab8cdf9eb3 Mon Sep 17 00:00:00 2001 From: John Kerski Date: Thu, 1 Feb 2024 21:57:38 -0500 Subject: [PATCH 2/6] Update BPARules.json --- BestPracticeRules/BPARules.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BestPracticeRules/BPARules.json b/BestPracticeRules/BPARules.json index 1f350670..3771b657 100644 --- a/BestPracticeRules/BPARules.json +++ b/BestPracticeRules/BPARules.json @@ -440,7 +440,7 @@ "Severity": 3, "Scope": "DataColumn, CalculatedColumn, CalculatedTableColumn", "Expression": "IsAvailableInMDX = false\r\n\r\nand\r\n(\r\nUsedInSortBy.Any()\r\nor\r\nUsedInHierarchies.Any()\r\nor\r\nUsedInVariations.Any()\r\nor\r\nSortByColumn != null\r\n)", - "FixExpression": "IsAvailableInMDX = true", + "FixExpression": "IsAvailableInMDX = true", "CompatibilityLevel": 1200 }, { @@ -648,7 +648,7 @@ "Category": "Formatting", "Severity": 2, "Scope": "Measure", - "Expression": "not FormatString.Contains(\"$\") and not FormatString.Contains(\"%\") and not (FormatString = \"#,0\" or FormatString = \"#,0.0\")", + "Expression": "(DataType = \"Int64\" or DataType = \"Decimal\" or DataType = \"Double\") and not FormatString.Contains(\"$\") and not FormatString.Contains(\"%\") and not (FormatString = \"#,0\" or FormatString = \"#,0.0\")", "FixExpression": "FormatString = \"#,0\"", "CompatibilityLevel": 1200 }, @@ -724,4 +724,4 @@ "Expression": "Name.ToUpper().Contains(\"MONTH\")\r\nand\r\n! Name.ToUpper().Contains(\"MONTHS\") \r\nand \r\n\n\nDataType == DataType.String \r\nand \r\nSortByColumn == null", "CompatibilityLevel": 1200 } -] +] \ No newline at end of file From d0e654adf386feeb055d5d4111323b26e2caf294 Mon Sep 17 00:00:00 2001 From: John Kerski <85596845+kerski@users.noreply.github.com> Date: Tue, 30 Apr 2024 22:53:15 -0400 Subject: [PATCH 3/6] Update FabricPS-PBIP.psm1 Handle empty files. For example, an empty DAX Query View file. --- pbidevmode/fabricps-pbip/FabricPS-PBIP.psm1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pbidevmode/fabricps-pbip/FabricPS-PBIP.psm1 b/pbidevmode/fabricps-pbip/FabricPS-PBIP.psm1 index 73631632..de8902e1 100644 --- a/pbidevmode/fabricps-pbip/FabricPS-PBIP.psm1 +++ b/pbidevmode/fabricps-pbip/FabricPS-PBIP.psm1 @@ -756,7 +756,7 @@ Function Import-FabricItems { $partPath = $filePath.Replace($itemPathAbs, "").TrimStart("\").Replace("\", "/") - $fileEncodedContent = [Convert]::ToBase64String($fileContent) + $fileEncodedContent = ($fileContent) ? [Convert]::ToBase64String($fileContent) : "" Write-Output @{ Path = $partPath @@ -976,7 +976,7 @@ Function Import-FabricItem { $partPath = $filePath.Replace($itemPathAbs, "").TrimStart("\").Replace("\", "/") - $fileEncodedContent = [Convert]::ToBase64String($fileContent) + $fileEncodedContent = ($fileContent) ? [Convert]::ToBase64String($fileContent) : "" Write-Output @{ Path = $partPath @@ -1181,4 +1181,4 @@ Function Set-SemanticModelParameters { [Microsoft.AnalysisServices.Tabular.TmdlSerializer]::SerializeDatabaseToFolder($database, $modelPath) } } -} \ No newline at end of file +} From fed42d4a6f65369b2f61bd0be0fbde53ea7d63f2 Mon Sep 17 00:00:00 2001 From: John Kerski Date: Wed, 1 May 2024 12:35:07 -0400 Subject: [PATCH 4/6] Update FabricPS-PBIP.psm1 Handle empty files. For example, an empty DAX Query View file. --- pbidevmode/fabricps-pbip/FabricPS-PBIP.psm1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pbidevmode/fabricps-pbip/FabricPS-PBIP.psm1 b/pbidevmode/fabricps-pbip/FabricPS-PBIP.psm1 index 73631632..de8902e1 100644 --- a/pbidevmode/fabricps-pbip/FabricPS-PBIP.psm1 +++ b/pbidevmode/fabricps-pbip/FabricPS-PBIP.psm1 @@ -756,7 +756,7 @@ Function Import-FabricItems { $partPath = $filePath.Replace($itemPathAbs, "").TrimStart("\").Replace("\", "/") - $fileEncodedContent = [Convert]::ToBase64String($fileContent) + $fileEncodedContent = ($fileContent) ? [Convert]::ToBase64String($fileContent) : "" Write-Output @{ Path = $partPath @@ -976,7 +976,7 @@ Function Import-FabricItem { $partPath = $filePath.Replace($itemPathAbs, "").TrimStart("\").Replace("\", "/") - $fileEncodedContent = [Convert]::ToBase64String($fileContent) + $fileEncodedContent = ($fileContent) ? [Convert]::ToBase64String($fileContent) : "" Write-Output @{ Path = $partPath @@ -1181,4 +1181,4 @@ Function Set-SemanticModelParameters { [Microsoft.AnalysisServices.Tabular.TmdlSerializer]::SerializeDatabaseToFolder($database, $modelPath) } } -} \ No newline at end of file +} From ee02106b64062cd75f31b3bbb2a58db90fd7be35 Mon Sep 17 00:00:00 2001 From: John Kerski Date: Wed, 1 May 2024 12:38:20 -0400 Subject: [PATCH 5/6] reset FabricPS-PBIP.psm1 --- pbidevmode/fabricps-pbip/FabricPS-PBIP.psm1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pbidevmode/fabricps-pbip/FabricPS-PBIP.psm1 b/pbidevmode/fabricps-pbip/FabricPS-PBIP.psm1 index de8902e1..7456f1c1 100644 --- a/pbidevmode/fabricps-pbip/FabricPS-PBIP.psm1 +++ b/pbidevmode/fabricps-pbip/FabricPS-PBIP.psm1 @@ -756,7 +756,7 @@ Function Import-FabricItems { $partPath = $filePath.Replace($itemPathAbs, "").TrimStart("\").Replace("\", "/") - $fileEncodedContent = ($fileContent) ? [Convert]::ToBase64String($fileContent) : "" + $fileEncodedContent = [Convert]::ToBase64String($fileContent) Write-Output @{ Path = $partPath @@ -976,7 +976,7 @@ Function Import-FabricItem { $partPath = $filePath.Replace($itemPathAbs, "").TrimStart("\").Replace("\", "/") - $fileEncodedContent = ($fileContent) ? [Convert]::ToBase64String($fileContent) : "" + $fileEncodedContent = [Convert]::ToBase64String($fileContent) Write-Output @{ Path = $partPath From b1eebd87f56ba7a8790e67d00ef4e4485d5c050d Mon Sep 17 00:00:00 2001 From: John Kerski Date: Wed, 1 May 2024 12:39:21 -0400 Subject: [PATCH 6/6] Reset FabricPS-PBIP.psm1 --- pbidevmode/fabricps-pbip/FabricPS-PBIP.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pbidevmode/fabricps-pbip/FabricPS-PBIP.psm1 b/pbidevmode/fabricps-pbip/FabricPS-PBIP.psm1 index 7456f1c1..73631632 100644 --- a/pbidevmode/fabricps-pbip/FabricPS-PBIP.psm1 +++ b/pbidevmode/fabricps-pbip/FabricPS-PBIP.psm1 @@ -1181,4 +1181,4 @@ Function Set-SemanticModelParameters { [Microsoft.AnalysisServices.Tabular.TmdlSerializer]::SerializeDatabaseToFolder($database, $modelPath) } } -} +} \ No newline at end of file