Power Query editor - Automatisk formattering af ny-importerede kolonner
HejJeg importerer data fra tabeller på en hjemmeside.
Hver måned kommer der en ny kolonne med forgangne måneds resultat.
Tallene i denne nye kolonne er formateret som Tekst, og jeg omformaterer derfor den nye kolonne til Tal manuelt hver måned i editoren.
Er det muligt at få editoren til at formatere den nye kolonne til tal automatisk?
Mvh
Johan
(Det er en offenligt tilgængelig side, så jeg kan godt dele min M Power Query)
let
Kilde = Web.Page(Web.Contents("https://www.jobindsats.dk/jobindsats/sv/DatabankViewer/ShowResult?BenefitGroupId=Y01&MeasurementId=Y01A01&AreaType=_nykom&FrequencyId=m&CubeId=star_y01a01&AreaSort=alpha&HasPivot=true&MGroupIds=mgrpA01_1&AreaIds=145&PeriodIds=2017M01%2C2017M02%2C2017M03%2C2017M04%2C2017M05%2C2017M06%2C2017M07%2C2017M08%2C2017M09%2C2017M10%2C2017M11%2C2017M12%2C2018M01%2C2018M02%2C2018M03%2C2018M04%2C2018M05%2C2018M06%2C2018M07%2C2018M08%2C2018M09%2C2018M10%2C2018M11%2C2018M12%2C2019M01%2C2019M02%2C2019M03%2C2019M04%2C2019M05%2C2019M06%2C2019M07%2C2019M08%2C2019M09%2C2019M10%2C2019M11%2C2019M12&RowAxis=_omrade%2CMeasurementAxis&ColumnAxis=_periode&Name=#step3")),
Data0 = Kilde{0}[Data],
#"Ændret type" = Table.TransformColumnTypes(Data0,{{"", type text}, {"2", type text}, {"3", type text}, {"Jan 2017", type text}, {"Feb 2017", type text}, {"Mar 2017", type text}, {"Apr 2017", type text}, {"Maj 2017", type text}, {"Jun 2017", type text}, {"Jul 2017", type text}, {"Aug 2017", type text}, {"Sep 2017", type text}, {"Okt 2017", type text}, {"Nov 2017", type text}, {"Dec 2017", type text}, {"Jan 2018", type text}, {"Feb 2018", type text}, {"Mar 2018", type text}, {"Apr 2018", type text}, {"Maj 2018", type text}, {"Jun 2018", type text}, {"Jul 2018", type text}, {"Aug 2018", type text}, {"Sep 2018", type text}, {"Okt 2018", type text}, {"Nov 2018", type text}, {"Dec 2018", type text}}),
#"Fjernede kolonner" = Table.RemoveColumns(#"Ændret type",{"", "2"}),
#"Omdøbte kolonner" = Table.RenameColumns(#"Fjernede kolonner",{{"3", "Varighed"}}),
#"Ændret type1" = Table.TransformColumnTypes(#"Omdøbte kolonner",{{"Jan 2017", Int64.Type}, {"Feb 2017", Int64.Type}, {"Mar 2017", Int64.Type}, {"Apr 2017", Int64.Type}, {"Maj 2017", Int64.Type}, {"Jun 2017", Int64.Type}, {"Jul 2017", Int64.Type}, {"Aug 2017", Int64.Type}, {"Sep 2017", Int64.Type}, {"Okt 2017", Int64.Type}, {"Nov 2017", Int64.Type}, {"Dec 2017", Int64.Type}, {"Jan 2018", Int64.Type}, {"Feb 2018", Int64.Type}, {"Mar 2018", Int64.Type}, {"Apr 2018", Int64.Type}, {"Maj 2018", Int64.Type}, {"Jun 2018", Int64.Type}, {"Jul 2018", Int64.Type}, {"Aug 2018", Int64.Type}, {"Sep 2018", Int64.Type}, {"Okt 2018", Int64.Type}, {"Nov 2018", Int64.Type}, {"Dec 2018", Int64.Type}})
in
#"Ændret type1"