Skip to content

Instantly share code, notes, and snippets.

@cbaragao
Created September 29, 2025 18:32
Show Gist options
  • Select an option

  • Save cbaragao/94165efde67cd12750eaa5152cf4b3e4 to your computer and use it in GitHub Desktop.

Select an option

Save cbaragao/94165efde67cd12750eaa5152cf4b3e4 to your computer and use it in GitHub Desktop.
Median of Means =
VAR __Partition = AddColumns(SampleData, "__Group", MOD(RANKX(ALL(SampleData),SampleData[ID],,ASC),5))
VAR __Means = SUMMARIZE(__Partition,[__Group], "__GroupMean", AVERAGE(SampleData[Value1]))
VAR __Result = MEDIANX(__Means,[__GroupMean])
RETURN __Result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment