Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I need to create a retention chart (for the past 10 fiscal years) to compare this fiscal year, with last fiscal year, and calculate differences between the two.
1) [FY IDs] - Fiscal year distinct Id count: = count(distinct[Id])
2) [PFY IDs] - Previous fiscal year distinct Id count: = below(count(distinct[Id]))
3) [FY Total] - Fiscal year amount total: = sum([Amount])
4) [PFY Total] - Previous fiscal year amount total: = below(sum([Amount]))
5) [Overall Retention] - % ratio comparison in Id counts (#1/#2):
= (count(distinct[Id]) / below(count(distinct[Id])))
6) [Overall Revenue Retention] - % ratio comparison in total amount (#3/#4)
= (sum([Amount]) / below(sum([Amount])) )
All this works fine... but I need to calculate these...
7) [Retained IDs]
= count of distinct ids in this Fiscal Year, who were also in last Fiscal Year (intersection, not union)
😎 [Retention Rate]
= [Retained IDs] / [PFY IDs] or (#7/#2)
9) [Revenue Variance] (i.e. compare revenue for retained donors, only), expressed as a ratio
= [FY Total] / [PFY Total] * for [Retained IDs] only
10) [Retained IDs] per user selections. That is, include same user-selections for both Fiscal Years (for #7, #8, and #9).
For example, suppose a user selects several dimensions (e.g., division, account, and gift-type). Then, the comparison to the previous year summations should be for the same dimension (division, account, and gift-type). Again, a retained Id would only be distinct IDs that gave in both years (intersection, not union)… so, same Id list, same dimensions. Consider the following, however:
In other words, the status of ‘retained’ needs to match the user selections… same dimensions and same Id list. That is, count the Ids who in both Fiscal Years, for the specific set of dimension selections.
I have a sample qvw, called “retention example.qvw.” When it compares years, it only counts unique IDs, for a given year. Moreover, it can filter Ids for a dimension, by association. But these are only Fiscal Year + Dimension counts – not a count of distinct Ids that gave both years. The actual Id lists are different. The below() and above() functions don’t consider Ids that in gave both years (i.e., actual Is that were retained)…
Questions:
1) What is the best approach to this?
2) For #7, how do I select Ids from this Fiscal Year, who were also in last Fiscal Year? Something like this [though none of these work]:
count(DISTINCT {1<[FiscalYear] = {$(=FiscalYear)} >} [Gifts Id])
count(DISTINCT {1<[FiscalYear] = {$(=FiscalYear)-1} >} [Gifts Id])
count(DISTINCT {1<[FiscalYear] = {$(=year(only(FiscalYear)-1))} >} [Gifts Id])
3) Then I need to determine the intersection
count(DISTINCT {$<FiscalYear=($(='FiscalYear'))>}*{$<FiscalYear=($(='FiscalYear')-1)>} [Gifts Id])
Note…I’ve had difficulty showing set analysis expression results…for every row of a straight table. The expressions I’ve tried don’t evaluate in a row … unless a Fiscal Year is selected by a user, and then the calculation works only for one row (and only displays for one row).
count(DISTINCT {1<FiscalYear={ $(=year(only(FiscalYear)-1)) } >} [Gifts Id])
I need to have the counts for all rows
4) Do you have suggestion on how to I handle #9, #10?
Thanks in advance, for any suggestions,
Jarrell
See attached qvw.
Gysbert,
Hello, thanks so much. The way you organized this is helpful. These help with item 1-6. Any ideas for #7-10?
I tried the intersection of two sets: Count(DISTINCT {<Type={'Current'}>*<Type={'Previous'}>} [Id])
But this merely returns zeros...
Jarrell
Jarrell, did you ever get #6 through #10 figured out? I have a similar challenge and am looking for help!
Leah, no, not yet... I need to beg back to this... if I can get to it, solve it, will let you know
Jarrell