microsoft / microsoft/Analysis-Services
BestPracticeRules/BPARules.json: Rule `PERCENTAGE_FORMATTING` incorrectly formatted
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 732
- Forks
- 433
- PR merge metrics
- No merged PRs in 30d
Description
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 %)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open BestPracticeRules/BPARules.json and locate the PERCENTAGE_FORMATTING rule. Update the expected and fix format strings to include the escaped spaces before the percent signs, then verify that both expressions match the suggested formatting.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100