How do I extract multiple dates in one cell using power query or dax? I had tried it via Split column delimeter / or - but it only extracted the first date. See table below for the example
Employee ID | Title | Name | Leaves | Total Leaves Consumed | Total Remaining Leaves |
1111 | Staff | Kim Ho | 01/05/2021 - 1 Days (Kim Ho) 01/06/2021 - 1 Days (Kim Ho) 01/07/2021 - 1 Days (Kim Ho) 01/08/2021 - 1 Days (Kim Ho) | 4 | 11 |
The result I want to get is:
Employee ID | Title | Name | Leaves | Total Leaves Consumed | Total Remaining Leaves |
1111 | Staff | Kim Ho | 01/05/2021 | 4 | 11 |
1111 | Staff | Kim Ho | 01/06/2021 | 4 | 11 |
1111 | Staff | Kim Ho | 01/07/2021 | 4 | 11 |
1111 | Staff | Kim Ho | 01/08/2021 | 4 | 11 |
Solved! Go to Solution.
NewStep=#table(Table.ColumnNames(PreviousStepName),List.TransformMany(Table.ToRows(PreviousStepName),each List.RemoveItems(Text.Split(_{3},"#(lf)"),{null,""}),(x,y)=>List.FirstN(x,3)&{Date.From(Text.Split(y,"-"){0})}&List.Skip(x,4)))
NewStep=#table(Table.ColumnNames(PreviousStepName),List.TransformMany(Table.ToRows(PreviousStepName),each List.RemoveItems(Text.Split(_{3},"#(lf)"),{null,""}),(x,y)=>List.FirstN(x,3)&{Date.From(Text.Split(y,"-"){0})}&List.Skip(x,4)))
Thank you! That worked for me!
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!
At the monthly call, connect with other leaders and find out how community makes your experience even better.
User | Count |
---|---|
131 | |
19 | |
18 | |
14 | |
13 |
User | Count |
---|---|
156 | |
33 | |
31 | |
23 | |
18 |