Forum Discussion
faheem_Latif_BI
3 years agoHelper I
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...
- 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()))
Samarth_18
3 years agoCommunity Champion
Could you please share the error?
faheem_Latif_BI
3 years agoHelper I
- Samarth_183 years agoCommunity Champion
faheem_Latif_BI Please try this:-
#"Added Custom" = Table.AddColumn(#"Added Custom", "Previous_MonthYear", each Text.PadStart( Text.From(Date.Month(DateTime.LocalNow())-1),2,"0")&Text.From(Date.Year(DateTime.LocalNow()))) in #"Added Custom"- faheem_Latif_BI3 years agoHelper I
smart 18
UR star