From 613cb66736bcfcf9844a8986ba537fec586c1ad8 Mon Sep 17 00:00:00 2001 From: Chris Wagner Date: Tue, 19 Mar 2024 16:38:54 -0500 Subject: [PATCH 1/3] Adding rule to eliminate DAX Calculated Columns --- BestPracticeRules/BPARules.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/BestPracticeRules/BPARules.json b/BestPracticeRules/BPARules.json index c8aa0024..a8f1a1b3 100644 --- a/BestPracticeRules/BPARules.json +++ b/BestPracticeRules/BPARules.json @@ -220,6 +220,16 @@ "Expression": "AllColumns.Where(Type.ToString() == \"Calculated\").Count() > 5", "CompatibilityLevel": 1200 }, + { + "ID": "NO_CALCULATED_COLUMNS", + "Name": "[Performance] No DAX Columns - Eliminate the use of calculated columns", + "Category": "Performance", + "Description": "Eliminate the use of Calcualted Columns. In addition to SQLBI's guidance that Calculated columns: do not compress as well as data columns so they take up more memory, slow down processing times for both the table as well as process recalc. Offload calculated column logic to your data warehouse and turn these calculated columns into data columns. 16 additional reasons to eliminate DAX Calculated Columns - \r\nReference: https://www.youtube.com/watch?v=oKuO0_17Y5o", + "Severity": 2, + "Scope": "Model", + "Expression": "AllColumns.Where(Type.ToString() == \"Calculated\").Count() > 0", + "CompatibilityLevel": 1200 + }, { "ID": "CHECK_IF_BI-DIRECTIONAL_AND_MANY-TO-MANY_RELATIONSHIPS_ARE_VALID", "Name": "[Performance] Check if bi-directional and many-to-many relationships are valid", From 087d5200a0486b2bf945302c6adc84b61f10a3ce Mon Sep 17 00:00:00 2001 From: Chris Wagner Date: Tue, 19 Mar 2024 16:43:20 -0500 Subject: [PATCH 2/3] Upping severity to 3 to fail code deployments - NO DAX COLUMNS --- BestPracticeRules/BPARules.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BestPracticeRules/BPARules.json b/BestPracticeRules/BPARules.json index a8f1a1b3..1403ef04 100644 --- a/BestPracticeRules/BPARules.json +++ b/BestPracticeRules/BPARules.json @@ -225,7 +225,7 @@ "Name": "[Performance] No DAX Columns - Eliminate the use of calculated columns", "Category": "Performance", "Description": "Eliminate the use of Calcualted Columns. In addition to SQLBI's guidance that Calculated columns: do not compress as well as data columns so they take up more memory, slow down processing times for both the table as well as process recalc. Offload calculated column logic to your data warehouse and turn these calculated columns into data columns. 16 additional reasons to eliminate DAX Calculated Columns - \r\nReference: https://www.youtube.com/watch?v=oKuO0_17Y5o", - "Severity": 2, + "Severity": 3, "Scope": "Model", "Expression": "AllColumns.Where(Type.ToString() == \"Calculated\").Count() > 0", "CompatibilityLevel": 1200 From 4266366bfc78a16c558422da7c7435b639ed9070 Mon Sep 17 00:00:00 2001 From: Chris Wagner Date: Wed, 20 Mar 2024 09:07:07 -0500 Subject: [PATCH 3/3] Changing Severity to 2 per BPA rules --- BestPracticeRules/BPARules.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BestPracticeRules/BPARules.json b/BestPracticeRules/BPARules.json index 1403ef04..a8f1a1b3 100644 --- a/BestPracticeRules/BPARules.json +++ b/BestPracticeRules/BPARules.json @@ -225,7 +225,7 @@ "Name": "[Performance] No DAX Columns - Eliminate the use of calculated columns", "Category": "Performance", "Description": "Eliminate the use of Calcualted Columns. In addition to SQLBI's guidance that Calculated columns: do not compress as well as data columns so they take up more memory, slow down processing times for both the table as well as process recalc. Offload calculated column logic to your data warehouse and turn these calculated columns into data columns. 16 additional reasons to eliminate DAX Calculated Columns - \r\nReference: https://www.youtube.com/watch?v=oKuO0_17Y5o", - "Severity": 3, + "Severity": 2, "Scope": "Model", "Expression": "AllColumns.Where(Type.ToString() == \"Calculated\").Count() > 0", "CompatibilityLevel": 1200