Hi All,
I am having a data as attached below for each date in asset_changedate column. What i am trying to achieve is to group the data by asset number and asset status,by dividing the changedate in month intervals, starting from the present date, for any number of past years.
For ex, I need to find the total number of ACTIVE status rows for an asset in last month(starting from the present date when the flow runs), and then total number in previous month and so on.... And similarly for other statuses.
How could i achieve this?
| asset_number | asset_status | asset_changedate |
| 1280481008 | ACTIVE | 5/22/2016 0:00 |
| 1280481008 | ACTIVE | 5/24/2016 0:00 |
| 1280481008 | ACTIVE | 5/26/2016 0:00 |
| 1280481008 | ACTIVE | 5/28/2016 0:00 |
| 1280481008 | ACTIVE | 5/30/2016 0:00 |
| 1280481008 | OOS | 9/11/2016 0:00 |
| 1280481008 | OOS | 9/13/2016 0:00 |
| 1280481008 | OOS | 9/15/2016 0:00 |
| 1280481008 | OOS | 9/17/2016 0:00 |
| 1280481008 | OOS | 9/19/2016 0:00 |
| 80920 | OOS | 8/5/2016 0:00 |
| 80920 | OOS | 8/7/2016 0:00 |
| 80920 | OOS | 8/9/2016 0:00 |
| 80920 | OOS | 8/11/2016 0:00 |
| 80920 | OOS | 8/13/2016 0:00 |
| 80920 | ACTIVE | 8/15/2016 0:00 |
| 80920 | ACTIVE | 8/17/2016 0:00 |
| 80920 | ACTIVE | 8/19/2016 0:00 |
| 80920 | ACTIVE | 8/21/2016 0:00 |
| 80920 | ACTIVE | 8/23/2016 0:00 |