Is LW, is PW, is PM fields to add

Hello,

I would like to ask how can I add calculated fields in my datasets as per following screenshot:
image

I would like to add three new fields: IS LW, IS PW, IS PM and flag 1 whether is true, either 0.
IS LW(is last week) = if yes 1, else 0
IS PW(is previous week) = if yes 1, else 0
IS PM(is previous month) = if yes 1, else 0

Thanks to everyone.

Do you have a date field in your dataset? You can try to use the extract function to get the week number and month number from your date. Then compare with the week number and month number of the current date.

1 Like