Forum Discussion
Anonymous
6 years agoNot applicable
Transformation : Last Month Flag
Hi, I am trying to make flag of Last month,but unable to do so. How can i create a column with flag T/F against Last month S.NO User Date 1 A1 1-Jun-20 2 A2 19-Jul-20 3 a3...
v-zhenbw-msft
Community Support
6 years agoHi Anonymous ,
Do you want to add a column to distinguish the last month and current month?
If yes, you can refer the following formula.
Flag =
var _current_month = MONTH(TODAY())
var _month = MONTH('Table'[Date])
return
IF(
_month=_current_month,
"Y",
IF(
_month=_current_month-1,
"N","Other"
)
)
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.