Forum Discussion
rhockman
May 12, 2023Copper Contributor
Power Query
Is there a way to extract these dates from one cell and add new rows for each date, easily in power query or another method?
another 365
=LET( clean, SUBSTITUTE(SUBSTITUTE(Table1[Date],"*","")," ",""), concat, LAMBDA(n,d, n & "," & SUBSTITUTE(d,",",";" & n & ",")), VSTACK( Table1[#Headers], TEXTSPLIT(TEXTJOIN(";",,MAP(Table1[Name],clean,concat)),",",";") ) )
5 Replies
Sort By
- LorenzoSilver Contributor
another 365
=LET( clean, SUBSTITUTE(SUBSTITUTE(Table1[Date],"*","")," ",""), concat, LAMBDA(n,d, n & "," & SUBSTITUTE(d,",",";" & n & ",")), VSTACK( Table1[#Headers], TEXTSPLIT(TEXTJOIN(";",,MAP(Table1[Name],clean,concat)),",",";") ) )
- LorenzoSilver Contributor
- Patrick2788Silver Contributor
A 365 solutions perhaps:
=REDUCE( {"Name", "Date"}, SORT(UNIQUE(Table1[Name])), LAMBDA(a, v, LET( filtered, TEXTJOIN(",", , FILTER(Table1[Date], Table1[Name] = v)), split, SORT(TEXTSPLIT(filtered, , ",")), r, ROWS(split), VSTACK(a, HSTACK(EXPAND(v, r, , v), split)) ) ) )