From 819fe8f4cf6974d05dec0e18b816d0a7c8aca1bc Mon Sep 17 00:00:00 2001 From: m-kovalsky Date: Sun, 13 Jun 2021 07:32:18 +0300 Subject: [PATCH 1/3] v1.1.2 --- BestPracticeRules/BPARules.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BestPracticeRules/BPARules.json b/BestPracticeRules/BPARules.json index 4f915c6..254217d 100644 --- a/BestPracticeRules/BPARules.json +++ b/BestPracticeRules/BPARules.json @@ -275,7 +275,7 @@ "Description": "Use the DIVIDE function instead of using \"/\". The DIVIDE function resolves divide-by-zero cases. As such, it is recommended to use to avoid errors. \r\nReference: https://docs.microsoft.com/en-us/power-bi/guidance/dax-divide-function-operator", "Severity": 2, "Scope": "Measure, CalculatedColumn, CalculationItem", - "Expression": "RegEx.IsMatch(Expression,\"\\]\\s*\\/\")\r\nor\r\nRegEx.IsMatch(Expression,\"\\)\\s*\\/\")", + "Expression": "RegEx.IsMatch(Expression,\"\\]\\s*\\/(?!\\/)\")\r\nor\r\nRegEx.IsMatch(Expression,\"\\)\\s*\\/(?!\\/)\")", "CompatibilityLevel": 1200 }, { From 9234ff6d55af8bf085bfa9073ab9a4023ed4de9e Mon Sep 17 00:00:00 2001 From: m-kovalsky Date: Sun, 13 Jun 2021 07:34:14 +0300 Subject: [PATCH 2/3] v1.1.2 --- BestPracticeRules/BPARules.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BestPracticeRules/BPARules.json b/BestPracticeRules/BPARules.json index 254217d..e255276 100644 --- a/BestPracticeRules/BPARules.json +++ b/BestPracticeRules/BPARules.json @@ -275,7 +275,7 @@ "Description": "Use the DIVIDE function instead of using \"/\". The DIVIDE function resolves divide-by-zero cases. As such, it is recommended to use to avoid errors. \r\nReference: https://docs.microsoft.com/en-us/power-bi/guidance/dax-divide-function-operator", "Severity": 2, "Scope": "Measure, CalculatedColumn, CalculationItem", - "Expression": "RegEx.IsMatch(Expression,\"\\]\\s*\\/(?!\\/)\")\r\nor\r\nRegEx.IsMatch(Expression,\"\\)\\s*\\/(?!\\/)\")", + "Expression": "RegEx.IsMatch(Expression,\"\\]\\s*\\/(?!\\/)(?!\\*)\")\r\nor\r\nRegEx.IsMatch(Expression,\"\\)\\s*\\/(?!\\/)(?!\\*)\")", "CompatibilityLevel": 1200 }, { From 7278d999a95c0fb5ffb07f619dba4a62d2890f5c Mon Sep 17 00:00:00 2001 From: m-kovalsky Date: Sun, 13 Jun 2021 07:35:34 +0300 Subject: [PATCH 3/3] Update README.md --- BestPracticeRules/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BestPracticeRules/README.md b/BestPracticeRules/README.md index 14ed304..fc68e4e 100644 --- a/BestPracticeRules/README.md +++ b/BestPracticeRules/README.md @@ -74,6 +74,10 @@ w.DownloadFile(url, downloadLoc); ## Version History +* 2021-06-13 Version 1.1.2 + * Modified Rules + * [DAX Expressions] Use the DIVIDE function for division + * Updated the rule logic to not mistake comments for division * 2021-05-26 Version 1.1.1 * Modified Rules * [DAX Expressions] Inactive relationships that are never activated