topic Re: Cumulative SUM for Top Ten Items in Anaplan Platform
https://community.anaplan.com/t5/Anaplan-Platform/Cumulative-SUM-for-Top-Ten-Items/m-p/117765#M29137
<P><LI-USER uid="26577"></LI-USER> </P><P>Great start but lets work on getting you to the final solution. </P><P>So with the rankings in place you now want to sum up the top performers until the cumulative % exceeds 70%?</P><P>Therefore, we will combine an IF THEN ELSE function with RANKCUMULATE.</P><P>We start with the IF THEN ELSE so that we can direct the outcome to either continue with the sum or to exist and return a zero if the outcome meets the query conditions. </P><P>Next we need to consider the query that will direct the function to the TRUE or FALSE outcome and place the most probable outcome as true and least probable as false. This approach will maximise the efficiency of the formula as the calculation will be able to exist each iteration at the earliest point and move onto the next one, therefore speeding it up. </P><P>Next is then understanding how we use RANKCUMULATE to sum the % in order of the ranking that you have already produced. This will form part of the query conditions and also one of the outcomes.</P><P>Putting it all together we should have something like the following;</P><P> </P><P><STRONG>=IF RANKCUMULATE(Vendor %, Rank, ASCENDING)>0.8 THEN 0 ELSE RANKCUMULATE(Vendor %, Rank, ASCENDING, TRUE, Group By)</STRONG></P><P> </P><P>I would use the keyword ASCENDING as you are summing up from rank 1 onwards with rank 1 being the largest Vendor %.</P><P>The above will continue to generate the FALSE outcome of <STRONG>RANKCUMULATE(Vendor %, Rank, ASCENDING, TRUE, Group By) </STRONG>upto the point where the RANKCUMULATE generates a sum greater than 80%. </P><P>I have placed the RANKCUMULATE as the false outcome as the majority of outcomes will be FALSE. </P><P>If this is not true then swap the inequality to be > and swap the outcomes over. </P><P> </P><P>Let me know how you get on.</P>Wed, 25 Aug 2021 07:59:39 GMTChrisHeathcote2021-08-25T07:59:39ZCumulative SUM for Top Ten Items
https://community.anaplan.com/t5/Anaplan-Platform/Cumulative-SUM-for-Top-Ten-Items/m-p/117586#M29075
<P>Hi There,</P><P> </P><P>I was wondering if you can point me in the right direction on finding how to do the below <span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:">ðŸ˜ƒ</span></P><P>I am trying to build a report that can show me just the Vendor that make the 70% of the Total Expense. I have 3 dimensions (VEndor LIST, Cost Center and Product). As a Line items I have the "Expense" and "% of Expense". From this data I want to show on a Dashboard just the Vendors that make the 70% of the expense, I have tried cumulative but it doesn't work or maybe I just did it wrong.....Thank you!</P><P> </P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CommunityMember132037_0-1629749443816.png" style="width: 400px;"><img src="https://community.anaplan.com/t5/image/serverpage/image-id/51174i25330E269B82B934/image-size/medium?v=v2&px=400" role="button" title="CommunityMember132037_0-1629749443816.png" alt="CommunityMember132037_0-1629749443816.png" /></span></P><P> </P>Mon, 23 Aug 2021 20:14:42 GMThttps://community.anaplan.com/t5/Anaplan-Platform/Cumulative-SUM-for-Top-Ten-Items/m-p/117586#M29075CommunityMember1320372021-08-23T20:14:42ZRe: Cumulative SUM for Top Ten Items
https://community.anaplan.com/t5/Anaplan-Platform/Cumulative-SUM-for-Top-Ten-Items/m-p/117594#M29079
<P>You will need to combine SORT the vendors and RANK them to place your vendors into descending order.</P><P> </P><P>Finally use RANKCUMULATE to SUM in order of descending rank the vendors which contribute the most.</P><P> </P><P>Use IF THEN ELSE to stop the SUM when value exceeds a threshold. In this case 70%.</P><P> </P><P>These functions will all work across multiple dimensions. </P>Mon, 23 Aug 2021 21:38:07 GMThttps://community.anaplan.com/t5/Anaplan-Platform/Cumulative-SUM-for-Top-Ten-Items/m-p/117594#M29079ChrisHeathcote2021-08-23T21:38:07ZRe: Cumulative SUM for Top Ten Items
https://community.anaplan.com/t5/Anaplan-Platform/Cumulative-SUM-for-Top-Ten-Items/m-p/117608#M29087
<P>Hi Chris <LI-USER uid="19172"></LI-USER> </P><P> </P><P>Thanks for the help. I did the RANK and it worked <span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:">ðŸ˜ƒ</span> but it seems that is just doing it at a higher level....below on the Picture If I select Corporate as a Concenter then the RANK start at 8 but I think it is because when you put "All Cost Centers - Expenses" like the second picture you have RANK since 1 and so on...so it is being applied at a higher level.....Is that right?</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CommunityMember132037_0-1629834061278.png" style="width: 400px;"><img src="https://community.anaplan.com/t5/image/serverpage/image-id/51212i90743D114B98D54B/image-size/medium?v=v2&px=400" role="button" title="CommunityMember132037_0-1629834061278.png" alt="CommunityMember132037_0-1629834061278.png" /></span></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CommunityMember132037_1-1629834130094.png" style="width: 400px;"><img src="https://community.anaplan.com/t5/image/serverpage/image-id/51213i504E3AD4525679FB/image-size/medium?v=v2&px=400" role="button" title="CommunityMember132037_1-1629834130094.png" alt="CommunityMember132037_1-1629834130094.png" /></span></P><P> </P><P>Besides I am having issues with the "RANKCUMULATE", I was thinking that should be as follow RANCUMULATE("Vendor%", Expense, DESCENDING, ......) I am having issues with the threshold to stop the calcs up to 70%. Should I add one more line item to do the IF THEN ELSE Formula?</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CommunityMember132037_0-1629761714160.png" style="width: 400px;"><img src="https://community.anaplan.com/t5/image/serverpage/image-id/51182iA012DC06C6992925/image-size/medium?v=v2&px=400" role="button" title="CommunityMember132037_0-1629761714160.png" alt="CommunityMember132037_0-1629761714160.png" /></span></P><P>Thanks for the help!</P><P> </P>Tue, 24 Aug 2021 19:43:56 GMThttps://community.anaplan.com/t5/Anaplan-Platform/Cumulative-SUM-for-Top-Ten-Items/m-p/117608#M29087CommunityMember1320372021-08-24T19:43:56ZRe: Cumulative SUM for Top Ten Items
https://community.anaplan.com/t5/Anaplan-Platform/Cumulative-SUM-for-Top-Ten-Items/m-p/117609#M29088
<P><LI-USER uid="26577"></LI-USER> </P>
<P> </P>
<P>I will let <LI-USER uid="19172"></LI-USER> finish this up, but one suggestion I would do, and it really doesn't mean a whole lot to the naked eye, but it will decrease the number of calculations the system has to do. In your Expense? line item, change the formula to be Expense <> 0. This way, you are not having to do multiple calculations (less than 0 OR greater than 0). And OR's are always bad for performance.</P>
<P> </P>
<P>Rob</P>Mon, 23 Aug 2021 23:47:05 GMThttps://community.anaplan.com/t5/Anaplan-Platform/Cumulative-SUM-for-Top-Ten-Items/m-p/117609#M29088rob_marshall2021-08-23T23:47:05ZRe: Cumulative SUM for Top Ten Items
https://community.anaplan.com/t5/Anaplan-Platform/Cumulative-SUM-for-Top-Ten-Items/m-p/117720#M29124
<P>Hi <LI-USER uid="19172"></LI-USER> </P><P> </P><P>I went an apply a guidance from "Dynamic Ranking" Article and it helped me to "RANK" the vendor at the lowest Level for Product and Cost Center =). But now I don't know what to do on just having the RANKCUMULATE to SUM up to 80% of the Total Expenses. Thanks for the help.</P><P> </P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CommunityMember132037_0-1629839383569.png" style="width: 400px;"><img src="https://community.anaplan.com/t5/image/serverpage/image-id/51217i56B02B852B522C5C/image-size/medium?v=v2&px=400" role="button" title="CommunityMember132037_0-1629839383569.png" alt="CommunityMember132037_0-1629839383569.png" /></span></P><P>A view of the "Blue Print" so far.</P><P> </P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CommunityMember132037_1-1629839449336.png" style="width: 400px;"><img src="https://community.anaplan.com/t5/image/serverpage/image-id/51219iFB77793FDE09C681/image-size/medium?v=v2&px=400" role="button" title="CommunityMember132037_1-1629839449336.png" alt="CommunityMember132037_1-1629839449336.png" /></span></P><P> </P><P> </P><P>Regards,</P>Tue, 24 Aug 2021 21:11:09 GMThttps://community.anaplan.com/t5/Anaplan-Platform/Cumulative-SUM-for-Top-Ten-Items/m-p/117720#M29124CommunityMember1320372021-08-24T21:11:09ZRe: Cumulative SUM for Top Ten Items
https://community.anaplan.com/t5/Anaplan-Platform/Cumulative-SUM-for-Top-Ten-Items/m-p/117765#M29137
<P><LI-USER uid="26577"></LI-USER> </P><P>Great start but lets work on getting you to the final solution. </P><P>So with the rankings in place you now want to sum up the top performers until the cumulative % exceeds 70%?</P><P>Therefore, we will combine an IF THEN ELSE function with RANKCUMULATE.</P><P>We start with the IF THEN ELSE so that we can direct the outcome to either continue with the sum or to exist and return a zero if the outcome meets the query conditions. </P><P>Next we need to consider the query that will direct the function to the TRUE or FALSE outcome and place the most probable outcome as true and least probable as false. This approach will maximise the efficiency of the formula as the calculation will be able to exist each iteration at the earliest point and move onto the next one, therefore speeding it up. </P><P>Next is then understanding how we use RANKCUMULATE to sum the % in order of the ranking that you have already produced. This will form part of the query conditions and also one of the outcomes.</P><P>Putting it all together we should have something like the following;</P><P> </P><P><STRONG>=IF RANKCUMULATE(Vendor %, Rank, ASCENDING)>0.8 THEN 0 ELSE RANKCUMULATE(Vendor %, Rank, ASCENDING, TRUE, Group By)</STRONG></P><P> </P><P>I would use the keyword ASCENDING as you are summing up from rank 1 onwards with rank 1 being the largest Vendor %.</P><P>The above will continue to generate the FALSE outcome of <STRONG>RANKCUMULATE(Vendor %, Rank, ASCENDING, TRUE, Group By) </STRONG>upto the point where the RANKCUMULATE generates a sum greater than 80%. </P><P>I have placed the RANKCUMULATE as the false outcome as the majority of outcomes will be FALSE. </P><P>If this is not true then swap the inequality to be > and swap the outcomes over. </P><P> </P><P>Let me know how you get on.</P>Wed, 25 Aug 2021 07:59:39 GMThttps://community.anaplan.com/t5/Anaplan-Platform/Cumulative-SUM-for-Top-Ten-Items/m-p/117765#M29137ChrisHeathcote2021-08-25T07:59:39ZRe: Cumulative SUM for Top Ten Items
https://community.anaplan.com/t5/Anaplan-Platform/Cumulative-SUM-for-Top-Ten-Items/m-p/117820#M29151
<P>Thank you <LI-USER uid="19172"></LI-USER> !!</P><P>It worked perfectly - I had no clue on how to use the IF THEN ELSE as I though that I needed to apply first SUM and then the formula with the RANCUMULATE (a little bit of misunderstanding on my end) .</P><P> </P><P>I have just modify a little bit the formula <STRONG>=IF RANKCUMULATE(Vendor %, Rank, ASCENDING)>0.8 THEN 0 ELSE RANKCUMULATE(Vendor %, Rank, ASCENDING, TRUE, Group By) </STRONG>as it was given me 0% for the subgroups, so I added <STRONG>=IF RANKCUMULATE(Vendor %, Rank, ASCENDING, TRUE, Group By)>0.8 THEN 0 ELSE RANKCUMULATE(Vendor %, Rank, ASCENDING, TRUE, Group By) </STRONG> and "Magic Happen".</P><P> </P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CommunityMember132037_0-1629906891748.png" style="width: 400px;"><img src="https://community.anaplan.com/t5/image/serverpage/image-id/51243i0B8DEB60C9BD2D74/image-size/medium?v=v2&px=400" role="button" title="CommunityMember132037_0-1629906891748.png" alt="CommunityMember132037_0-1629906891748.png" /></span></P><P> </P><P>Thanks! <span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:">ðŸ˜ƒ</span></P>Wed, 25 Aug 2021 15:57:31 GMThttps://community.anaplan.com/t5/Anaplan-Platform/Cumulative-SUM-for-Top-Ten-Items/m-p/117820#M29151CommunityMember1320372021-08-25T15:57:31ZRe: Cumulative SUM for Top Ten Items
https://community.anaplan.com/t5/Anaplan-Platform/Cumulative-SUM-for-Top-Ten-Items/m-p/117850#M29156
Great. Glad that it worked out!Wed, 25 Aug 2021 19:50:06 GMThttps://community.anaplan.com/t5/Anaplan-Platform/Cumulative-SUM-for-Top-Ten-Items/m-p/117850#M29156ChrisHeathcote2021-08-25T19:50:06Z