Skip to content
New issue

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

BestPracticeRules/BPARules.json: Rule PERCENTAGE_FORMATTING incorrectly formatted #316

Open
Julian-J-S opened this issue Nov 25, 2024 · 0 comments

Comments

@Julian-J-S
Copy link

First of all, thank you for providing nice CI for power bi! I followed this tutorial here: https://learn.microsoft.com/en-us/power-bi/developer/projects/projects-build-pipelines

The CI Rule for PERCENTAGE_FORMATTING could be improved imo

"ID": "PERCENTAGE_FORMATTING",
"Name": "[Formatting] Percentages should be formatted with thousands separators and 1 decimal",
"Category": "Formatting",
"Severity": 2,
"Scope": "Measure",
"Expression": "FormatString.Contains(\"%\") and FormatString <> \"#,0.0%;-#,0.0%;#,0.0%\"",
"FixExpression": "FormatString = \"#,0.0%\\u003B-#,0.0%\\u003B#,0.0%\"",
"CompatibilityLevel": 1200

Problem
The expected format has the following problems

  • missing the space between the number and the % (correct scientific notation has a space between number and unit)
  • deviates from powerbi default %-formatting (which also has the space)

Suggestion

  • old: #,0.0%;-#,0.0%;#,0.0%
  • new: #,0.0\ %;-#,0.0\ %;#,0.0\ % (uses space ; also power bi default for %)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant