Lead formula not allowed for formula summary

Highlighted
Contributor

Lead formula not allowed for formula summary

Hi,

I have a line item in percentage (POC). I already created the formula and set the summary totals to formula to get the correct %. But I need the value of the percentage for the following year. for example my period is Jan 2020, I need to reflect the value of the percentage in Jan 2021 in my Jan 2020 period. I tried using the formula LEAD to get the value. Formula : Lead(lineitem,12,0) but it is not working if the summary total is set to formula. If I dont set the summary to Formula,  I will get incorrect percentage at the totals level since it will just sum it up.

 

How do I get now the correct value of percentage?

 

Thanks

9 REPLIES 9
Highlighted
Frequent Contributor

Re: Lead formula not allowed for formula summary

Hi @Ana_M ,

 

You can create one more line item formatted time scale to year and reference the lineitem which you created. it will create subsidiary view. please find the below screenshot. Yes, You can not set summary to formula. please find the below link https://help.anaplan.com/anapedia/Content/Calculation_Functions/All/LEAD.html

 

Please share the sample what exactly do you want.

 

naushad786_0-1584694307808.png

 

naushad786_1-1584694450389.png

 

naushad786_2-1584694484925.png

Hope, it will help you.

 

Thanks,

Naushad

 

 

 

 

Highlighted
Contributor

Re: Lead formula not allowed for formula summary

HI,

 

Thanks! I tried this but is not working

 

Ana_M_0-1584696995540.png

It should be this amount

 

Ana_M_1-1584697082359.png

Any other suggestion?

 

Thank

Highlighted
Certified Master Anaplanner

Re: Lead formula not allowed for formula summary

Hi @Ana_M 

 

Yes, You cannot set the Time Summary to Formula while using Lead function. However, you can easily set the Main summary as 'Formula' and your Time Summary as 'Sum' or None as our intention is to bring in the previous period data. Then you the Lead function to get the value from the previous year month. If you see below, I have shown you the screenshots for city level and All Region levels. In both cases, the percentages in 2019 are the same as 2018. 

 

1.PNG2.PNG

3.PNG

Regards,

GS

Highlighted
Contributor

Re: Lead formula not allowed for formula summary

Hi,

 

I also need it for the year, is it possible?

 

Thanks

Highlighted
Certified Master Anaplanner

Re: Lead formula not allowed for formula summary

Hi @Ana_M ,

 

It is definitely possible. Then use Lead for the above line items. Please see the screenshot below.1.PNG2.PNG

Highlighted
Master Anaplanner/Community Boss

Re: Lead formula not allowed for formula summary

@Ana_M 

 

Easiest way and the simplest way is to break this into pieces. Don't Use LEAD function on the calculated Ratio instead use it on the inputs that you are using for calculating the Ratio. Here is one example for your reference.In this example I am trying to pull Values back by 3 months i.e., from Apr to Jan

 

Num - Input

Denom - input

Ratio = Num/Denom - Summary as formula

Lead Ratio - Lead(Ratio,3,0) - Summary as SUM, Incorrect values at Quarter Level

Revised Num - Lead(Num,3,0)

Revised Denom- Lead(Denom,3,0)

Revised Lead Ratio = Revised Num/Revised Denom ; Summary set as Formula 

 

Misbah_0-1584695716770.png

Misbah_1-1584696070272.png

 

 

@gaurav_sharma-bng Not the recommended way of modelling. We should avoid hard coding while modelling

 @naushad786 Avoid Subsidiary views as much as you can 

Highlighted
Contributor

Re: Lead formula not allowed for formula summary

HI,

 

This worked. Thank you so much! 🙂

 

Regards,

Ana

Highlighted
Certified Master Anaplanner

Re: Lead formula not allowed for formula summary

Totally agreed @Misbah , on the Hard coding comment. We should not hardcode in formulas. I just did not want to confuse creating additional logic or line items. Wanted to quickly help with the actual problem being faced by Ana

 

Regards,

GS

Highlighted
Master Anaplanner/Community Boss

Re: Lead formula not allowed for formula summary

@gaurav_sharma-bng  Sure!!.

 

As long as we are following PLANS we will be in a better position to deliver a great experience to the end users. Cheers