Forum Discussion

faheem_Latif_BI's avatar
3 years ago
Solved

previous date

Hi ,   Im using this for current month and year which is working fine.   currentdate=(Date.ToText(DateTime.Date(DateTime.LocalNow()),"MMyyyy")) Output is =112022   now i want to get prevoius m...
  • Samarth_18's avatar
    3 years ago

    Hi faheem_Latif_BI ,

     

    Please try below mquery code in custom column:-

    Text.PadStart(Text.From(Date.Month(DateTime.LocalNow())-1),2,"0")&Text.From(Date.Year(DateTime.LocalNow()))