Forum Discussion
Anonymous
3 years agoNot applicable
Help creating a new table from another table
Hello,
Is there a way in which I can have a table like this
Fecha inicioFecha finalIPNombre
| Begining | End | ID | Name |
| 3/16/2023 | 3/16/2023 | 2337266 | Oscar |
| 3/20/2023 | 3/21/2023 | 2782871 | Sophia |
| 3/21/2023 | 3/22/2023 | 2264595 | Rachel |
| 3/22/2023 | 3/23/2023 | 2250748 | Elena |
To a simpler table like this in which each date is a different row
| Date | ID | Name |
| 3/16/2023 | 2337266 | Oscar |
| 3/20/2023 | 2782871 | Sophia |
| 3/21/2023 | 2782871 | Sophia |
| 3/21/2023 | 2264595 | Rachel |
| 3/22/2023 | 2264595 | Rachel |
| 3/22/2023 | 2250748 | Elena |
| 3/23/2023 | 2250748 | Elena |
pls try this
List.Transform( {Number.From([Begining]) ..Number.From([End]) }, Date.From)
4 Replies
- vicky_Super User
Yeah - you can go to power query and un-pivot the ID and Name columns using a function like:
= Table.UnpivotOtherColumns(#"Changed Type1", {"ID", "Name"}, "Attribute", "Date")
Just delete the extra column after.
- AnonymousNot applicable
Does that work also if there are more than 2 days between begining and end? so for example:
Beginning End ID Name 3/21/2023 3/23/2023 2811162 Camila to something like this
Date ID Name 3/21/2023 2811162 Camila 3/22/2023 2811162 Camila 3/23/2023 2811162 Camila - AnonymousNot applicable
Well what worked for me from another post was this
Tabla1 =var c = CALENDARAUTO()returnGENERATE('Asistance', FILTER(c, [Date] >='Asistance'[Beginning] && [Date] <= 'Asistance'[End]))
- AhmedxSuper User
pls try this
List.Transform( {Number.From([Begining]) ..Number.From([End]) }, Date.From)