Hello @arkiboys ,
Thanks for the question and using MS Q&A platform.
If check or make sure if the date column is from previous month or not you can use below expression in dataflow expression builder.
equals(subMonths(lastDayOfMonth(currentDate()),1), lastDayOfMonth(toDate(dateColumnName,'yyyy-MM-dd')))
You can use combination of lastDayOfMonth() and subMonths() functions to achieve your requirement and this will calculate the correct Month difference even there is a change in year same as yours (for Example Current month is Jan 2023 and the dateColumn Month is Dec 2022). These functions will take care of it automatically. You can avoid the extra step to verify the year difference.
Sample demonstration below:
Hope this will help. Please let us know if any further queries.
------------------------------
- Please don't forget to click on
or upvote
button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how - Want a reminder to come back and check responses? Here is how to subscribe to a notification
- If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators