Rank code example
Example: Rank
If(Customer <> Previous(Customer), 1,
If(OrderAmount <> Previous(OrderAmount), Peek(Rank) + 1, Peek(Rank))) as Rank
If(Customer <> Previous(Customer), 1,
If(OrderAmount <> Previous(OrderAmount), Peek(Rank) + 1, Peek(Rank))) as Rank