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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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