# how to define full quarters

Options
Member

I'm using this formula to calculate the average quarterly engagements

SUM(`Total Engagements`) / COUNT(DISTINCT QUARTER(`Date`) )

When a marketing campaign data falls under full and partial quarters, however, this approach generates a skewed number.

I need a way to test for and countthe number of full quarters that a campaign runs so that I can calculate average quarterly engagement based that instead.

Thanks in advance for the help!

• Coach
Options

Could you clarify what you mean by full and partial quarters? In your beastmode you only use a single date which would always fall in a "full quarter". Do you need to use a range of dates, meaning your campaign started on one date and ran through to another date and you wanted to only count those that ran from the very start to very end of quarter? More information would be helpful.

• Member
Options

One campaign, for example, launched on 12/20 of last year and will complete at the end of this year. It only ran a few days in Q4 FY22 and Q2 FY23 isn't over yet, so I'd want to exclude those two quarters.

• Member
Options

Thanks so much!

• Coach
Options

Love @colemenwilson approach! I might be overthinking it but there is a slight change I would make to Step 4, since currently the formula would return Full Quarter for the following scenarios for example:

• something that only has entries from 1/1 to 1/31, since it is Q = 1 starting on a 1st and ending on a 31st.
• something with entries from 6/1 to 6/30, since it is Q = 2 and starts on a 1st ending on a 30th.

So you might want to check also the Month of the `Minimum Date` and `Minimum Date` to ensure is taking a full quarter.

Just keep in mind that as he stated, you need to have an entry for each campaign day even when there are no engagements, so you might need to create additional entries first to ensure this. Also Quarter returns a single 1-4 number, so if you have campaigns that might span for more than a year, you might want to do something like for your Distinct Count:

```(QUARTER(`Date`)-1)+4*YEAR(`Date`)
```

Which returns a unique number that represents each quarter.

@cthtcc, something you might want to think about, since the final goal is to show average quarterly engagements, is how should your report work when a campaign has not been active for at least 1 full quarter? Lets say it launched on 1/20/2023 and we're on 6/29/2023, so it has not been active for a single full quarter, although it has been active for more than 5 months. In your current definition that would be 0 full quarters which will error out when trying to do the division. You could consider that each quarter has on average 92 days, so you can prorate.

• Coach
Options