— CAN YOU SOLVE THIS - EXCEL CHALLENGE 199 —
(Solutions in any language are also welcome for Excel Challenges)
List the count of dates along with Min and Max date for the rows in columns A & B where MM + DD = YY.
(Dates given are in MDY format)
For example : 12/13/2025 where 12+13 = 25 which is equal to YY part of the year which is 25.
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/dnQ-N_7j
#excel, #excelchallenge, #powerquerychallenge, #daxchallenge, #m, #dax, #powerbi, #powerquery, #powerpivot, #sheets, #googlesheets, #data, #analytics, #businessintelligence, #finance, #office365, #python, #r
LinkedIn Post:
LinkedIn Post by:
محمد حلمي
=TEXTSPLIT(CONCAT(MAP(A2:A6,B2:B6,LAMBDA(a,b,LET(d,SEQUENCE(b-a+1,,a),
r,FILTER(d,DAY(d)+MONTH(d)=YEAR(d)-2000),CONCAT(HSTACK(ROWS(r),MIN(r),MAX(r))&" "))))&"-")," ","-",1)+0
not sure to use min/max versus take. I expect take to calculate faster, but haven’t tested (using phone)
TEXTSPLIT(TEXTJOIN(";",1,(MAP(A2:A6,B2:B6,LAMBDA(a,b,LET(d,SEQUENCE(1+b-a,,a),f,FILTER(d,MONTH(d)+DAY(d)=--TEXT(d,"yy")),TEXTJOIN(",",1,COUNT(f),TAKE(f,1),TAKE(f,-1))))))),",",";")
Listing the Count, Min and Max dates w/ #powerquery. #bitanbit #powerbi
let
Source = Excel.CurrentWorkbook(){[Name="Input"]}[Content],
Solution = Table.FromRows(List.Transform(Table.ToRows(Source), each let l = ([List.Select](http://list.select/)(List.Transform({Number.From(_{0})..Number.From(_{1})}, each Date.From(_)), each Date.Month(_) + [Date.Day](http://date.day/)(_) = Number.Mod(Date.Year(_), 100))) in {List.Count(l), l{0}, List.Max(l)}), {"Count", "Min Date", "Max Date"})
in
Solution