# Custom Period Type must contain todays date?

**URL:** <https://pug.phocassoftware.com/t/custom-period-type-must-contain-todays-date/844>\
**Category:** Ask the Community\
**Created:** [January 10, 2019, 7:40pm UTC](https://pug.phocassoftware.com/t/custom-period-type-must-contain-todays-date/844 "2019-01-10T19:40:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aaron.roma](https://sea1.discourse-cdn.com/flex015/user_avatar/pug.phocassoftware.com/aaron.roma/32/285_2.png) [@aaron.roma](https://pug.phocassoftware.com/u/aaron.roma)\
**Post date:** [January 10, 2019, 7:40pm UTC](https://pug.phocassoftware.com/t/custom-period-type-must-contain-todays-date/844/1 "2019-01-10T19:40:07Z")

</div>

We have a need to do some analysis of our business done on Saturdays. To this end, we’d like to have some favorites setup that compare sales just across Saturdays. I can’t see an obvious way I could get to a Saturday using offset or special dates. So I had the thought of creating a custom Period Type just containing Saturdays.

The issue I’m running in to, is apparently a Period Type must contain todays date in one of the periods, otherwise it won’t work. So I’m unable to create periods with just Saturdays.

I assume this is by design and not a bug?

Any thoughts on another way to accomplish my original goal of analyzing Saturday sales? (Without having to hard code and change dates each week.)

(Below screenshot shows behavior when current date is not contained in a period.)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/phocassoftware/original/1X/f8e968eb1307a4c17b996ff4686f32dfb7f33061.png)

---

<div class="post-metadata">

**Author:** ![anon66559099](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@anon66559099](https://pug.phocassoftware.com/u/anon66559099)\
**Post date:** [January 17, 2019, 8:11pm UTC](https://pug.phocassoftware.com/t/custom-period-type-must-contain-todays-date/844/2 "2019-01-17T20:11:08Z")

</div>

Correct it’s by design.  
To enable the use of offset periods, the offset is always from period containing today eg.  
-1 is the previous period whether that be a quarter, week etc.

Another way to do this would be add a dimension of weekday, you could then select just Saturdays.  
If you have access to DB designer a transform column with:  
DATEPART(weekday,[INVOICE\_DATE]) amend column name to suit, returns 1 for Sun 2 Mon Etc

---

<div class="post-metadata">

**Author:** ![aaron.roma](https://sea1.discourse-cdn.com/flex015/user_avatar/pug.phocassoftware.com/aaron.roma/32/285_2.png) [@aaron.roma](https://pug.phocassoftware.com/u/aaron.roma)\
**Post date:** [January 17, 2019, 10:47pm UTC](https://pug.phocassoftware.com/t/custom-period-type-must-contain-todays-date/844/3 "2019-01-17T22:47:04Z")

</div>

Thanks for the info. I ended up working around this by using a sync source for my time period. In this sync source, I’m using some SQL to dynamically return the current day, plus the past 52 Saturdays.

Now I can use a -1 offset to give me the last Saturday, and can even do a period comparison to compare a year’s worth of Saturdays.
