Level 2 Sprint 3 INV01 - Not 1st week of Timescale?

Highlighted
Contributor

Re: Level 2 Sprint 3 INV01 - Not 1st week of Timescale?

@einas.ibrahim @Misbah 

In the training module, we have created NOT 1st week of time scale? line item in SYS01 tym settings by week module. So why we are trying to find out first week of timescale using OFFSET function?

IF NOT 1st week of time scale? PREVIOUS (Ending Inventory of previous week) ELSE DAT01 Beginning Inv Module.Beginning Inventory

Does this formula not serve the purpose?, finding my way for how to get ending inventory line item for the previous week.

Highlighted
Certified Master Anaplanner

Re: Level 2 Sprint 3 INV01 - Not 1st week of Timescale?

Hi @kunal_311,

 

Let me answer your "hard coding" question first. There is no hardcoding in OFFSET(1,-1,0). Generally speaking, hardcoding is when you write a value that will change over time or product,....etc. For Example FY19 or IF Product.Product item = Apples.

In this OFFSET formula, none of the values will be obsolete or irrelevant regardless or changes in Time. As a matter of fact, this formula will continue to work even when the Time Range changes, For example when we move to the next planning year FY21

 

Now to your second question, I am not sure what are you asking exactly? The OFFSET formula is the formula we are using in SYS01 to determine the first week (or not the 1st week), We then reference this line item in our Inventory Ending formula in INV01.

Einas
"Give a Man a Fish, and You Feed Him for a Day. Teach a Man To Fish, and You Feed Him for a Lifetime"
Highlighted
Contributor

Re: Level 2 Sprint 3 INV01 - Not 1st week of Timescale?

Hi @einas.ibrahim 

Apprciate your efforts to make newbies like us to understand the concepts:

 

1) Understood the hardcoding part.

2) I mixed it with the formula to be used in INV01 and that with SYS01. Even I used "NOT Current period?" as my formula which after reading your explanation on why we need to use OFFSET Instead of CURRENTPERIOD, It makes more sense. so changed it now.

Highlighted
Certified Master Anaplanner

Re: Level 2 Sprint 3 INV01 - Not 1st week of Timescale?

Hey @kunal_311 

 

I'm always happy to help. 

 

I hope you realized why CurrentPeriod is not suitable. Current period changes - ideally every period. So while CurrentPeriod may be the same as the first period on the time scale - say on Jan 01, 20XX- once the current period moves to Feb, it is no longer the same as the first period of the time scale.

 

Keep on Anaplanning

 

 

Einas
"Give a Man a Fish, and You Feed Him for a Day. Teach a Man To Fish, and You Feed Him for a Lifetime"
Highlighted
Contributor

Re: Level 2 Sprint 3 INV01 - Not 1st week of Timescale?

Just one last point i want to understand, when we use offset function & we shift the weeks which are not 1 st week, but after offset why we need to provide =1 ?
OFFSET(x,n,z) = 1
Highlighted
Certified Master Anaplanner

Re: Level 2 Sprint 3 INV01 - Not 1st week of Timescale?

Hey @kunal_311 

 

On the semantics side .....

The Not 1st week? is of data type Boolean, right?

which mean any formula we right in this line item should return a Boolean (True or False)

The OFFSET(x,y,z) function returns the same format of the argument x

In the case of OFFSET(1,-1,0), x = 1 which is a number. so just writing OFFSET(1,-1,0) will return a number not a boolean, and will not be accepted.

 

On the logic side..

You need to know if the function succeeds in moving the 1 (x), -1 periods (y) and in that case, it returns the value 1, or fails (because it's at the beginning of the time scale and there is no prior period) and in this case, it returns the default value 0(z)

You need an expression that resolves to either TRUE or FALSE.

so you compare the returned value of the OFFSET function with either 1 or 0 it's your choice.

In the case of the first period

Does OFFSET(1,-1,0) = 1 ? No, this is FALSE, because the formula returns 0

 

 

Einas
"Give a Man a Fish, and You Feed Him for a Day. Teach a Man To Fish, and You Feed Him for a Lifetime"
Highlighted
Contributor

Re: Level 2 Sprint 3 INV01 - Not 1st week of Timescale?

Hi @Misbah @einas.ibrahim 

 

Thanks a lot for your explanation. What if I would like to find the first week of each year? As I understand, the OFFSET formula only finds the first week of the time range.

 

Thanks,

Xin

Highlighted
Master Anaplanner/Community Boss

Re: Level 2 Sprint 3 INV01 - Not 1st week of Timescale?

@xin 

 

See if this helps

Misbah_0-1598873279779.png

 

Misbah_1-1598873337560.png

Below is the filtered view of the output module.

Misbah_2-1598873430072.png

 

 

 

Highlighted
Occasional Contributor

Re: Level 2 Sprint 3 INV01 - Not 1st week of Timescale?

Hey Misbah,

 

This was a brilliant explanation for the OFFSET function.

 

However, I don't clearly understand how to enable 'End users to manually select the first week in FY20'. Could you please help me with this ?

 

Regards