On first glance, this seems a little raw, with several steps that are wholly unnecessary. However, it works. Hopefully, I can revisit this and clean it up a little.
Begin in Power BI, transforming the data. Do not rename columns, until specified.
- Add Column -> First Characters
- Extract the first digit of the numbers to be analyzed.
- Sort Lowest to Highest
- Click Column Title for First Characters Column
- Add as New Query, which will appear as a list.
- Convert List to Table [COLUMN1]
- Sort [COLUMN1] Lowest to Highest
- Group By (no change to default screen)
- Sort [COLUMN1] again, if needed to order
- Create Index Column beginning with 1
- Create Custom Column [COLUMN]
- List.Sum(List.Range(#"Added Index"[Count],0,[Index]))
- Create Custom Column [COLUMN.1]
- [Count]/List.Sum(#"Added Custom"[Count])
- Change [COLUMN.1] to %
- Add Column from Examples for Benford’s Law [COLUMN.2]
- 0.301
- 0.176
- 0.125
- 0.097
- 0.079
- 0.067
- 0.058
- 0.051
- 0.046
- Change [COLUMN.2] to %
- Rename
- [COLUMN.1] = Actual %
- [COLUMN.2] = Benford %
- Graph
The above was transcribed from the following YouTube video:
No comments:
Post a Comment