-
-
Save Hugoberry/155766c5dfde9c7aeef291d1907c3be9 to your computer and use it in GitHub Desktop.
DEC2BIN or HEX2BIN in Power Query M
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(num as number)=> | |
List.Last( | |
List.Generate( | |
() =>[reminder = num, | |
binString= Number.ToText(Number.BitwiseAnd(reminder,1))], | |
each [reminder]> 0, | |
each [reminder = Number.BitwiseShiftRight([reminder],1), | |
binString= Number.ToText(Number.BitwiseAnd(reminder,1))&[binString]], | |
each [binString] | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment