Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Hi, I have to use 6 column to create 3 date column that I can use later. This is done with multiple steps one column t the time.
How can I simplyfy this? Is there any tips?
#"Promoted Headers" = Table.PromoteHeaders(#"Emner - Detaljert oversikt - Em_Sheet", [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Undervis. årstall", Int64.Type}}),
#"Replaced Value" = Table.ReplaceValue(#"Changed Type","HØST","8",Replacer.ReplaceText,{"Undervis. termin"}),
#"Replaced Value1" = Table.ReplaceValue(#"Replaced Value","VÅR","1",Replacer.ReplaceText,{"Undervis. termin"}),
#"Changed Type1" = Table.TransformColumnTypes(#"Replaced Value1",{{"Eksamen årstall", Int64.Type}, {"Undervis. termin", Int64.Type}}),
#"Replaced Value2" = Table.ReplaceValue(#"Changed Type1","HØST","8",Replacer.ReplaceText,{"Eksamen termin"}),
#"Replaced Value3" = Table.ReplaceValue(#"Replaced Value2","VÅR","1",Replacer.ReplaceText,{"Eksamen termin"}),
#"Changed Type2" = Table.TransformColumnTypes(#"Replaced Value3",{{"Eksamen termin", Int64.Type}, {"Kull årstall", Int64.Type}}),
#"Replaced Value4" = Table.ReplaceValue(#"Changed Type2","HØST","8",Replacer.ReplaceText,{"Kull termin"}),
#"Replaced Value5" = Table.ReplaceValue(#"Replaced Value4","VÅR","1",Replacer.ReplaceText,{"Kull termin"}),
#"Changed Type3" = Table.TransformColumnTypes(#"Replaced Value5",{{"Kull termin", Int64.Type}}),
#"Added Custom" = Table.AddColumn(#"Changed Type3", "Und_Dato", each Date.ToText(#date([Undervis. årstall], [Undervis. termin], 1))),
#"Changed Type4" = Table.TransformColumnTypes(#"Added Custom",{{"Und_Dato", type date}}),
#"Added Custom1" = Table.AddColumn(#"Changed Type4", "Eksamen_Dato", each Date.ToText(#date([Eksamen årstall], [Eksamen termin],1))),
#"Changed Type5" = Table.TransformColumnTypes(#"Added Custom1",{{"Eksamen_Dato", type date}}),
#"Added Custom2" = Table.AddColumn(#"Changed Type5", "Kull_Dato", each Date.ToText(#date([Eksamen årstall], [Eksamen termin], 1)))
in
#"Added Custom2"
#"Promoted Headers" = Table.PromoteHeaders(#"Emner - Detaljert oversikt - Em_Sheet", [PromoteAllScalars=true]),
#"Replaced Value" = Table.ReplaceValue(#"Promoted Headers","HØST","8",Replacer.ReplaceText,{{"Undervis. termin"},{"Eksamen termin"},{"Kull termin"}}),
#"Replaced Value1" = Table.ReplaceValue(#"Replaced Value","VÅR","1",Replacer.ReplaceText,{{"Undervis. termin"},{"Eksamen termin"},{"Kull termin"}}),
#"Changed Type1" = Table.TransformColumnTypes(#"Replaced Value1",{{"Undervis. årstall", Int64.Type},{"Eksamen årstall", Int64.Type}, {"Undervis. termin", Int64.Type},{"Eksamen termin", Int64.Type}, {"Kull årstall", Int64.Type},{"Kull termin", Int64.Type}}),
#"Added Custom" = Table.AddColumn(#"Changed Type1", "Und_Dato", each Date.ToText(#date([Undervis. årstall], [Undervis. termin], 1))),
#"Added Custom1" = Table.AddColumn(#"Added Custom", "Eksamen_Dato", each Date.ToText(#date([Eksamen årstall], [Eksamen termin],1))),
#"Added Custom2" = Table.AddColumn(#"Added Custom1", "Kull_Dato", each Date.ToText(#date([Kull årstall], [Kull termin], 1)))
#"Changed Type5" = Table.TransformColumnTypes(#"Added Custom2",{{"Eksamen_Dato", type date},{"Und_Dato", type date},{"Kull_Dato", type date}})
in
#"Changed Type5"
Your Kull_dato formula was wrong.
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 14 | |
| 12 | |
| 9 | |
| 7 | |
| 7 |