Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
JarnoVisser
Helper I
Helper I

Calculate donor loyalty

Hi,

 

I need to calculate the loyalty of donors. So when a donor gives a donation for the first time he is active for that year. When he gives the next year again he is still active and so on. When he is not giving in a year he becomes inactive. When he gives the year thereafter again he starts to be active again.

My data is like:

DonorIDDateAmount
1001-2-2016100
1001-2-2017100
1001-2-2018100
1011-1-2015100
1011-1-2017100
1011-1-2018100

 

The outcome should be:

Inflowactive Year 1 active year 2active year 3
2015100
2016111
2017110
2018000

 

Thanks in advance!


Regards,

Jarno 

 

1 REPLY 1
stretcharm
Memorable Member
Memorable Member

If you create a date dimension table and then join your Donor data date. You can then summarise by date fields such as year.

 

You can create a date dim in either Dax or M language or from a db table. Here are some options

 

http://radacad.com/create-a-date-dimension-in-power-bi-in-4-steps-step-1-calendar-columns

https://www.mssqltips.com/sqlservertip/4857/creating-a-date-dimension-table-in-power-bi/

https://www.sqlbi.com/articles/reference-date-table-in-dax-and-power-bi/

 

Example of doing time intelligence

 

https://www.sqlbi.com/articles/time-intelligence-in-power-bi-desktop/

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors