— CAN YOU SOLVE THIS - EXCEL CHALLENGE 183 —
(Solutions in any language are also welcome for Excel Challenges)
List Tetradic numbers from column A.
A tetradic number is a number that remains unchanged when reversed or flipped up-down. Since the only numbers that remain unchanged which turned up-side-down are 0, 1, and 8, a Tetradic number is precisely a palindromic number containing only 0, 1, and 8 as digits
Examples - 11, 101, 181, 18181, 1008001
Post answers in Comment.
(Your formula need not be a single formula. You can write multiple formulas to arrive at a solution. Also your formula need not be different from others as long as you have worked out your formula independently)
Download Practice File - https://lnkd.in/dwRUp65i
#excel, #excelchallenge, #powerquerychallenge, #daxchallenge, #m, #dax, #powerbi, #powerquery, #powerpivot, #sheets, #googlesheets, #data, #analytics, #businessintelligence, #finance, #office365, #python, #r
Excel BI LinkedIn Post
Here is What Come to my mind
=FILTER(A2:A8,A2:A8=MAP(A2:A8,
LAMBDA(x,--TEXTJOIN("",,SORTBY(MID(x,SEQUENCE(1,LEN(x),1,1),1)
,SEQUENCE(,COUNTA(MID(x,SEQUENCE(1,LEN(x),-1,1),1)),1,
LinkedIn post by:
Alejandro Simón
let
Origen = Excel.CurrentWorkbook(){[Name="Tabla1"]}[Content],
Sel = [List.Select](http://list.select/)(List.Transform(Origen[Numbers], each Text.ToList( Text.From(_))), each _ = List.Reverse(_) and not List.ContainsAny(_, {"2".."7"}&{ "9"})),
Sol = List.Transform(Sel, each Number.From(Text.Combine(_, "")))
in
Sol
Hi Everyone, Here’s My M Code:
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
ChangeToText = Table.TransformColumnTypes(Source,{{"Numbers", type text}}),
Matching = Table.AddColumn(ChangeToText, "Match",
each List.ContainsAll(
Text.ToList([Numbers]), {"0","1", "8"}
)
),
Result = Table.SelectRows(Matching, each ([Match] = true))[[Numbers]]
in
Result
Tetradic numbers w/ #powerquery. #bitanbit #powerbi
let
Source = Excel.CurrentWorkbook(){[Name="Input"]}[Content],
Solution = [List.Select](http://list.select/)(Source[Numbers], each
let
l = Text.ToList(Text.From(_))
in
l = List.Reverse(l) and not List.ContainsAny(l, List.Difference({"0".."9"}, {"0", "1", "8"}))
)
in
Solution
hi everyone, my proposal solution:
=FILTER(A2:A8, MAP(A2:A8, LAMBDA(r, LET(_s, SEQUENCE(LEN(r)),_n, SUM(IFNA(INDEX({0,1,8}, XMATCH(--MID(r,_s,1), {0,1,8})), )*10^(_s-1)), r=_n))))
Hi to all!
One option could be:
=FILTER(A2:A8,MAP(A2:A8,LAMBDA(x,ISERR(TEXTSPLIT(x,{0;1;8},,1))*(--CONCAT(MID(x,16-ROW(1:15),1))=x))))
Blessings!
Not my best shot but it seems to work