topic Re: Diagonal sums over flat list dimension on Anaplan in Anaplan Platform
https://community.anaplan.com/t5/Anaplan-Platform/Diagonal-sums-over-flat-list-dimension-on-Anaplan/m-p/40265#M4127
<P>Hi David,</P><P> </P><P>Thanks for choosing to help me out.</P><P> </P><P>The "Days after Registration" is the offset (0, 1, 2 and so on), or aging days from a particular point in time (say, Jan 1).</P><P> </P><P>So, for Jan 1, an aging offset of 10 will be, Jan 11th. From Jan 1, every day's offset tracks the behavior of a variable indexed at Jan 1. </P><P> </P><P> </P><P>Let us assume the no. of people who registered for a free trial subscription on Jan 1 is X. Now, for this "cohort", the offset days tracks for each day, how many of those X who signed up on Jan 1, decide to actually convert into paid subscribers as days go by. Therefore, Jan1 + 0 = Jan1 will have 1%. Whereas, Jan1 + 1 = Jan 2 will have 2% and so on. So the time series is built for every day and each day the % will vary. </P><P> </P><P>This is different from the % for the Jan2 time series because the Jan2 no. of customers will be Y and they will have a different behavior over time because they may be exposed to different promotion campaigns or pricing and can have a different trajectory than X.</P><P> </P><P>However, say, on Jan 5, you need to add Jan5 + 0 = Jan5's %, but also you had some customers subscribing on Jan5 that belonged to the Jan4th cohort (Jan4 + 1 offset day's % = Jan5's contribution from Jan4 cohort), and Jan3 (+2 days offset of Jan3rd's subscribers), Jan 2nd and Jan1st too. </P><P> </P><P>So for, Jan 5th, you need a diagonal sum from that matrix. The matrix has Jan1, Jan2 chorots on the rows, and offset days that track the curve for each day on the columns. </P><P> </P><P>Does this make sense? Apologies for the involved explanation.</P>Wed, 16 Jan 2019 18:27:36 GMTvisivasa2019-01-16T18:27:36ZDiagonal sums over flat list dimension on Anaplan
https://community.anaplan.com/t5/Anaplan-Platform/Diagonal-sums-over-flat-list-dimension-on-Anaplan/m-p/40237#M4120
<P>Hello,</P><P> </P><P>To put the problem simply, I need to know how to do the diagonal sums of an array in Anaplan.</P><P> </P><P>To explain in detail: I have a module called "Daily Matrix". It has the dimensions: Time, Days after Registration (a List, that "Applies to" the entire module), and one of the line items in this module is a "Daily Rate %" (% formatted data point).</P><P> </P><P>Days after Registration (members are 0-1000) is a list that I am using for custom time calculations. </P><P> </P><P>The module looks like: </P><P> </P><P> 0 / 1 / 2 / 3 / 4 ... </P><P>(Model Time dim)</P><P>Jan 1 1% / 2% / 3 %/ 2% / 1%</P><P><SPAN>Jan 2 1% / 2% / 1 %/ 1% / 1%</SPAN></P><P><SPAN>Jan 3 1% / 3% / 1 %/ 2% / 1%</SPAN></P><P> </P><P> </P><P><SPAN>Now, I need diagonal sums, by day. i.e., for Jan 3, I need 1% + 2% (Jan 2, 1 day after registration) + 3% (Jan 1, 2 days after registration) = 6%.</SPAN></P><P> </P><P><SPAN>In other words, this is a diagonal sum for each day. If you do a diagonal sum, you would get the % contribution from the "cohort" Jan1, and Jan 2 as well, that will contribute to Jan 3. </SPAN></P><P> </P><P><SPAN>If you search for diagonal sum on Excel, you will get array calculations. What I am trying is methodologically the same.</SPAN></P><P> </P><P><SPAN>Can someone please help? Attached are images of the module where I have colored cells indicating the calcuations which shows this clearly.</SPAN></P><P> </P>Wed, 16 Jan 2019 01:26:57 GMThttps://community.anaplan.com/t5/Anaplan-Platform/Diagonal-sums-over-flat-list-dimension-on-Anaplan/m-p/40237#M4120visivasa2019-01-16T01:26:57ZRe: Diagonal sums over flat list dimension on Anaplan
https://community.anaplan.com/t5/Anaplan-Platform/Diagonal-sums-over-flat-list-dimension-on-Anaplan/m-p/40238#M4121
To clarify on the question, "Days after Registration" (0-1000) is treated as an "offset" to be added to each day. Thus Jan 1 + 10 (Days after Reg) = Jan 11.Wed, 16 Jan 2019 01:29:17 GMThttps://community.anaplan.com/t5/Anaplan-Platform/Diagonal-sums-over-flat-list-dimension-on-Anaplan/m-p/40238#M4121visivasa2019-01-16T01:29:17ZRe: Diagonal sums over flat list dimension on Anaplan
https://community.anaplan.com/t5/Anaplan-Platform/Diagonal-sums-over-flat-list-dimension-on-Anaplan/m-p/40251#M4125
<P><LI-USER uid="14748"></LI-USER></P><P>It is likely that you will need a module real time and fake time, but before I give any more advice, can you explain the significance of the 0,1,2, values for each day</P><P> </P><P>Why does the value change in Jan-1 from 1% to 2% to 3% to 2% to 1% etc?</P><P>David</P><P> </P><P> </P>Wed, 16 Jan 2019 10:05:23 GMThttps://community.anaplan.com/t5/Anaplan-Platform/Diagonal-sums-over-flat-list-dimension-on-Anaplan/m-p/40251#M4125DavidSmith2019-01-16T10:05:23ZRe: Diagonal sums over flat list dimension on Anaplan
https://community.anaplan.com/t5/Anaplan-Platform/Diagonal-sums-over-flat-list-dimension-on-Anaplan/m-p/40265#M4127
<P>Hi David,</P><P> </P><P>Thanks for choosing to help me out.</P><P> </P><P>The "Days after Registration" is the offset (0, 1, 2 and so on), or aging days from a particular point in time (say, Jan 1).</P><P> </P><P>So, for Jan 1, an aging offset of 10 will be, Jan 11th. From Jan 1, every day's offset tracks the behavior of a variable indexed at Jan 1. </P><P> </P><P> </P><P>Let us assume the no. of people who registered for a free trial subscription on Jan 1 is X. Now, for this "cohort", the offset days tracks for each day, how many of those X who signed up on Jan 1, decide to actually convert into paid subscribers as days go by. Therefore, Jan1 + 0 = Jan1 will have 1%. Whereas, Jan1 + 1 = Jan 2 will have 2% and so on. So the time series is built for every day and each day the % will vary. </P><P> </P><P>This is different from the % for the Jan2 time series because the Jan2 no. of customers will be Y and they will have a different behavior over time because they may be exposed to different promotion campaigns or pricing and can have a different trajectory than X.</P><P> </P><P>However, say, on Jan 5, you need to add Jan5 + 0 = Jan5's %, but also you had some customers subscribing on Jan5 that belonged to the Jan4th cohort (Jan4 + 1 offset day's % = Jan5's contribution from Jan4 cohort), and Jan3 (+2 days offset of Jan3rd's subscribers), Jan 2nd and Jan1st too. </P><P> </P><P>So for, Jan 5th, you need a diagonal sum from that matrix. The matrix has Jan1, Jan2 chorots on the rows, and offset days that track the curve for each day on the columns. </P><P> </P><P>Does this make sense? Apologies for the involved explanation.</P>Wed, 16 Jan 2019 18:27:36 GMThttps://community.anaplan.com/t5/Anaplan-Platform/Diagonal-sums-over-flat-list-dimension-on-Anaplan/m-p/40265#M4127visivasa2019-01-16T18:27:36ZRe: Diagonal sums over flat list dimension on Anaplan
https://community.anaplan.com/t5/Anaplan-Platform/Diagonal-sums-over-flat-list-dimension-on-Anaplan/m-p/40269#M4128
<P><LI-USER uid="14748"></LI-USER>,</P><P> </P><P>I believe you will need to use the PROFILE function within Anaplan (<A href="https://help.anaplan.com/anapedia/Content/Calculation_Functions/All/PROFILE.html). " target="_blank">https://help.anaplan.com/anapedia/Content/Calculation_Functions/All/PROFILE.html). </A> Also, I did a quick search on AppHub for cohort, and found an Anaplan model that might help you, Planning, Budgeting, and Forecasting for SaaS. I would recommend downloading that, looking though how they did it, specifically module SaaS Subscription Revenue Waterfall which is what I am thinking you are wanting.</P><P> </P><P>Hope this helps,</P><P>Rob</P>Wed, 16 Jan 2019 19:38:03 GMThttps://community.anaplan.com/t5/Anaplan-Platform/Diagonal-sums-over-flat-list-dimension-on-Anaplan/m-p/40269#M4128rob_marshall2019-01-16T19:38:03ZRe: Diagonal sums over flat list dimension on Anaplan
https://community.anaplan.com/t5/Anaplan-Platform/Diagonal-sums-over-flat-list-dimension-on-Anaplan/m-p/40272#M4129
<P>Hi Rob,</P><P> </P><P>Thanks. The SAAS Model is huge for me to follow (I am a beginner) but I see the PROFILE() and other usages that I can investigate and try to understand. </P><P> </P><P>In the meanwhile, to make this entire thread simple: can anyone point a formula to build a diagonal sum? I have everything else in place for cohort based revnue subscription modeling.</P><P> </P><P>Eg: </P><P> 1 / 2 / 3</P><P> </P><P> 1 0.5 / 0.5 / 0.5 </P><P> 2 1 / 2 / 1</P><P> 3 1 / 3 / 0.5</P><P> </P><P>The diagonal sum for Row 3 = 1 + 2 + 0.5 = 3.5 </P><P> </P><P> </P><P> </P>Wed, 16 Jan 2019 22:07:21 GMThttps://community.anaplan.com/t5/Anaplan-Platform/Diagonal-sums-over-flat-list-dimension-on-Anaplan/m-p/40272#M4129visivasa2019-01-16T22:07:21ZRe: Diagonal sums over flat list dimension on Anaplan
https://community.anaplan.com/t5/Anaplan-Platform/Diagonal-sums-over-flat-list-dimension-on-Anaplan/m-p/40300#M4133
<P><LI-USER uid="14748"></LI-USER></P><P>You can't do a diagonal calc as such, but you can use your 0-1000 list as the "fake" timescale.</P><P>I would advise putting in a check in the calculation to prevent the calculation running when it doesn't need to, so I have included how to do that here as well</P><P> </P><P>1. Time Lookups</P><P>Create a module to calculate the start of the current year; I've assumed you only want the current year forwards, but this can obviosuly be changed if needed using ADDYEARS(). There is not timescale or other dimensions needed<span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="2019-01-17_09-34-27.png" style="width: 408px;"><img src="https://community.anaplan.com/t5/image/serverpage/image-id/22506i835043F566677C21/image-size/large?v=1.0&px=999" title="2019-01-17_09-34-27.png" alt="2019-01-17_09-34-27.png" /></span></P><P> </P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="2019-01-17_09-34-49.png" style="width: 999px;"><img src="https://community.anaplan.com/t5/image/serverpage/image-id/22507iEA25F5754854FCAA/image-size/large?v=1.0&px=999" title="2019-01-17_09-34-49.png" alt="2019-01-17_09-34-49.png" /></span></P><P>2. I've used a 0-10 list for brevity. Create a line item in a module just dimensioned by this list to hold the offset values (you may already have this, but it is more efficient to have this in it's own module) and turn the summary off!<span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="2019-01-17_09-51-25.png" style="width: 398px;"><img src="https://community.anaplan.com/t5/image/serverpage/image-id/22510iCD92CF093C732B09/image-size/large?v=1.0&px=999" title="2019-01-17_09-51-25.png" alt="2019-01-17_09-51-25.png" /></span></P><P> </P><P>3. Assume the same data as your example</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="2019-01-17_09-28-43.png" style="width: 760px;"><img src="https://community.anaplan.com/t5/image/serverpage/image-id/22508iB03DE0CABCDD071B/image-size/large?v=1.0&px=999" title="2019-01-17_09-28-43.png" alt="2019-01-17_09-28-43.png" /></span></P><P> </P><P>4. Create a line item to calculate the offset date - START() - Assumptions.Value</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-01-17_09-55-28.png" style="width: 933px;"><img src="https://community.anaplan.com/t5/image/serverpage/image-id/22511iBB09602F149BF969/image-size/large?v=1.0&px=999" title="2019-01-17_09-55-28.png" alt="2019-01-17_09-55-28.png" /></span></P><P> </P><P>5. Add the Diagonal Calculation to lookup the data using the above date:</P><P> IF Offset day < Time Lookup.Current Year Start THEN 0 ELSE Data[LOOKUP: Offset day]</P><P><STRONG>Note the check to ensure the calculation doesn't run unless needed<span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="2019-01-17_09-42-54.png" style="width: 999px;"><img src="https://community.anaplan.com/t5/image/serverpage/image-id/22513i5658ECA4EAB33C77/image-size/large?v=1.0&px=999" title="2019-01-17_09-42-54.png" alt="2019-01-17_09-42-54.png" /></span></STRONG></P><P> </P><P>You will see the total now calculates the "diagonal sum"</P><P>6. You can reference this in other moduules using SELECT:<span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="2019-01-17_09-41-58.png" style="width: 513px;"><img src="https://community.anaplan.com/t5/image/serverpage/image-id/22514i8322755E519C6361/image-size/large?v=1.0&px=999" title="2019-01-17_09-41-58.png" alt="2019-01-17_09-41-58.png" /></span></P><P> </P><P>I would consider using a subset of the 0-1000 list if you don't need to go back that far, as this will improved the performance if the calculation module is as small as possible</P><P> </P><P>I hope this solves the problem for you</P><P>David</P>Fri, 18 Jan 2019 09:04:40 GMThttps://community.anaplan.com/t5/Anaplan-Platform/Diagonal-sums-over-flat-list-dimension-on-Anaplan/m-p/40300#M4133DavidSmith2019-01-18T09:04:40ZRe: Diagonal sums over flat list dimension on Anaplan
https://community.anaplan.com/t5/Anaplan-Platform/Diagonal-sums-over-flat-list-dimension-on-Anaplan/m-p/40369#M4148
<P>David,</P><P> </P><P> </P><P>Thanks a lot! It worked!</P><P> </P><P>I was adding the fake time list offset days to the current day and hence could not get the correct logic. Subtracting it was all that was needed. This exercise was eye opening <span class="lia-unicode-emoji" title=":slightly_smiling_face:">ðŸ™‚</span></P><P> </P><P> </P><P> </P>Fri, 18 Jan 2019 20:34:50 GMThttps://community.anaplan.com/t5/Anaplan-Platform/Diagonal-sums-over-flat-list-dimension-on-Anaplan/m-p/40369#M4148visivasa2019-01-18T20:34:50ZRe: Diagonal sums over flat list dimension on Anaplan
https://community.anaplan.com/t5/Anaplan-Platform/Diagonal-sums-over-flat-list-dimension-on-Anaplan/m-p/40570#M4180
<P>David,</P><P> </P><P>Thank you so much for helping out with this. I love our Community!!!</P><P> </P><P>Thank you.... Mike. </P>Fri, 25 Jan 2019 20:49:49 GMThttps://community.anaplan.com/t5/Anaplan-Platform/Diagonal-sums-over-flat-list-dimension-on-Anaplan/m-p/40570#M4180MikeWahl2019-01-25T20:49:49Z