Forum Discussion
Lapsed Donors Calculated Column
To create a column in your Donations dataset that indicates whether a donor has lapsed or not, you can follow these steps:
1. Determine your definition of a lapsed donor. For example, you may define a lapsed donor as someone who has not donated in the past 12 months.
2. Create a calculated column in your Donations table using the following DAX formula:
```
Lapsed = IF(DATEDIFF(MAX(Donations[Date]), TODAY(), MONTH) > 12, "Lapsed", "Not Lapsed")
```
This formula uses the DATEDIFF function to calculate the number of months between the last donation date for each donor and today's date. If the result is greater than 12, the donor is considered lapsed, and the "Lapsed" value is returned in the Lapsed column. Otherwise, the "Not Lapsed" value is returned.
3. Once you have created the Lapsed column, you can use it to filter your data and view a list of lapsed donors. For example, you can add a table or matrix visualization to your report and include the Lapsed column and Donor column in the Rows area. Then, you can use the filter pane to filter the Lapsed column to show only the "Lapsed" values. This will display a list of donors who have not donated in the past 12 months and are therefore considered lapsed.
4. You can also create a measure that counts the number of lapsed donors using the following DAX formula:
```
Lapsed Donors = COUNTROWS(FILTER(Donations, Donations[Lapsed] = "Lapsed"))
```
This formula uses the FILTER function to create a table that includes only the rows where the Lapsed column has a value of "Lapsed". Then, the COUNTROWS function is used to count the number of rows in this table, which represents the number of lapsed donors. You can add this measure to a card or other visualization to display the total number of lapsed donors in your dataset.