Skip to content

Instantly share code, notes, and snippets.

@ImkeF
Created February 9, 2020 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ImkeF/375eda233d3ed3e49ea22609576876a2 to your computer and use it in GitHub Desktop.
Save ImkeF/375eda233d3ed3e49ea22609576876a2 to your computer and use it in GitHub Desktop.
BenfordMeasure =
VAR BenfordNumber =
MAX ( BenfordTable[Value] )
VAR CountBenfordNumber =
CALCULATE (
COUNTROWS ( FactTable ),
LEFT ( FactTable[Value], 1 ) * 1 = BenfordNumber
)
VAR CountTotal =
COUNTROWS ( FactTable )
RETURN
DIVIDE ( CountBenfordNumber, CountTotal )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment