How can you mark the first week of every month in a timescale as TRUE

Hi Community -

I'm having a hard time trying to figure out a formula for a boolean filter that marks the first week of every month as TRUE. This filter will be used to isolate the first week of a month and sum values across a couple modules. And before anyone asks, I haven't been able to try much because I'm unsure of where to start. What's the best way to solve this? Thank you in advance!

Jared T Carbo

Best Answer

  • luke_e
    Answer ✓

    Assuming you're using a weekly timescale, you could probably get away with using something like,

    INPERIOD(START(<Month>))

    image.png image.png

    You can do it all in one line, but figured it's easier to visualise in two parts.

    • You need to define the parent time, which is Month, then
    • Use the start() function to determine what the start date of that period is and inperiod() does the TRUE/FALSE check to see if that period is the start.

    Just make sure you do this in a system module and don't dimensionalise the line with anything apart from Time (as it can get a bit hectic cell count wise with more granular time scales).

    Hope it helps.

Answers

  • Worked beautifully, thank you!

    Jared T Carbo