Time related Question
Hi experts
I have a Custom week dimension and I want to see week number in a particular Month what should I do.
0
Answers
-
For such cases you can use cumulate function (
).In you case what you can do is:
Write a formula Cumulate(1, 'First period?', *name of the week list*)
Where 'First period?' is a boolean-formatted line which represents the first week of every month.To create a correct formula for the 'First period?' line item you can do the following:
- Create supporting line item 'First week to months level', with formula Item(*name of the week list*) and apply summary "first non-blank
- Create a line item 'Month' applied to weeks with month list formatting and write formula Parent(item(*name of the week list*)) /* you probably have the same somewhere in the model, so you can use existing one*/
- Finally in the 'First period?' line item write a formula item(*name of the week list*) = 'First week to months level'[lookup: 'Month']
Kind regards,
Kostya1