none
Combine 2 power query codes RRS feed

  • Question

  • Dear all,

    I want to combine 2 codes. Because I want to add a zero before my month. How to fix it?

    = Table.TransformColumns(#"Extracted Year",{{"Month", Date.Month, Int64.Type}})

    Text.PadStart(Text.From([Month]),2,"0")

    Sunday, June 17, 2018 9:21 PM

Answers

  • Assuming that the order is exactly as you placed the codes, then it should be like this:

    Table.TransformColumns(#"Extracted Year",{{"Month", each Text.PadStart(  Text.From( Date.Month(_) ) , 2, "0"), Text.Type}})


    Monday, June 18, 2018 3:55 AM

All replies