Excel BI Challenge Workout 201

Power Query

let
	MyFun  = ( Number ) =>
		let
			Add   = Number + 1,
			Split = Text.ToList ( Text.From ( Add ) ),
			Check = List.IsDistinct ( Split ),
			Final = if Check then Add else @MyFun ( Add )
		in
			Final,
	Source = Excel.CurrentWorkbook(){[ Name = "data" ]}[Content],
	Return = Table.AddColumn ( Source, "Answer", each MyFun ( [Number] ) )
in
	Return

Next Number Distinct Digit.xlsx (24.0 KB)