2 Replies Latest reply on Apr 27, 2018 11:48 PM by Deepak Rai

# Account Measure for Specific Quarters

Hi,

I am trying to calculate the Current balance that got opened and closed over quarters with reference to opening date and closing date respectively.

So I want to have a bar graph with quarters (of date opened and closed) on x-axis and amount gained and amount lost bars side-by-side for all the quarters.

I am trying this LOD to get the total sum amount 2005 to 2018.

Gained = {FIXED DATEPART('quarter', [DateOpened]) : SUM(IF [DateOpened]>=#1/1/2005# AND [DateOpened]<=#03/31/2018# THEN [CurrentBalance]END)}

Closed = {FIXED DATEPART('quarter', [DateClosed]) : SUM(IF [DateClosed]>=#1/1/2005# AND [DateClosed]<=#03/31/2018# THEN [CurrentBalance]END)}

Have attached the workbook for reference.

Deepak Rai Had used something that you suggested for my previous query. But this one is a spinoff of the same.

Thanks

• ###### 1. Re: Account Measure for Specific Quarters

Hello Hrishikesh,

Did you review this - Current vs Previous Period to Date Comparison  as a starting place?  It is a very helpful example of open/close dates examples.

Patrick

• ###### 2. Re: Account Measure for Specific Quarters

You need to Pivot both your dates first. Please do that first