line item: First week of timescale?

Donna Marie
Contributor

line item: First week of timescale?

how do I build the formula in 'Sys01 time settings by week' for this line item

7 REPLIES 7
Donna Marie
Contributor

Re: line item: First week of timescale?

how do I build the formula in 'Sys01 time settings by week' for this line item i was looking at currentperiodstart and comparing it with start... cant quite figure out the relationship
rob_marshall
Moderator

Re: line item: First week of timescale?

@Donna Marie 

 

if this doesn't answer your question, it might be helpful to attach a couple of pictures. But, to return the first period of the timescale, you can use the LAG function formatted as a bolean.

 

2021-05-24_08-15-26.png2021-05-24_08-15-38.png

Donna Marie
Contributor

Re: line item: First week of timescale?

The learning materials hinted offset function

 

should i use offset(1,-1,0)  = 0

rob_marshall
Moderator

Re: line item: First week of timescale?

@Donna Marie 

 

No, with LAG and if you want to go back, you use a positive 1 as what I showed above.  If you use negative 1, it will go into the future (like a LEAD).

 

Rob

aseem_mutneja
Occasional Contributor

Re: line item: First week of timescale?

You need to get the current week against week dimension in a line item and keep the summary as "First Non-Blank" - It will set the value at all time periods=First Week of Time scale. Here are the two line items:

 

aseem_mutneja_0-1621862914184.png

 

The formula for boolean is: ITEM(Time) = First Week of Timescale[SELECT: TIME.All Periods]

 

Hope, this is what you are looking for.

Donna Marie
Contributor

Re: line item: First week of timescale?

what if first week of timescale is set as a Boolean?

aseem_mutneja
Occasional Contributor

Re: line item: First week of timescale?

Yes - that would the result. Line item names in the screenshot, I shared are somewhat misleading.

 

Line Item 1 - We can name it ItemWeek - dimensioned to Time - week

ItemWeek= Item(Time) - Summary would be first non-blank

Results of this would be:

 Week 1Week 2Week 3Week 4________________All Periods
ItemWeekWeek 1Week 2Week 3Week 4________________Week 1

 

First Week of Time Scale? :    ItemWeek=ItemWeek[Select: Time.All Periods]

 

This would only be true for Week 1.

 

Hope, this answers.