8 Replies Latest reply on Aug 8, 2018 5:27 AM by Michael Ye

# Current month minus first month of year calculation

Hi All,

i have to display current month sales minus first of month of year sales (Jan). Could you please anybody help me to know the exact calculation to display this.

Rajesh.

• ###### 1. Re: Current month minus first month of year calculation

Hi, Raja

Can you provide a sample workbook?

ZZ

• ###### 2. Re: Current month minus first month of year calculation

Raja:

You can build a calculated field:

SUM(if Year(date)=Year(today()) and  Month(date)=Month(today()) then [Sales] end)

-

SUM(if Year(date)=Year(today()) and  Month(date)=1 then [Sales] end)

Hope it helps.

Michael Ye

3 of 3 people found this helpful
• ###### 3. Re: Current month minus first month of year calculation

Hi Michael,

Thanks for your quick reply and i tried your shared calculation but getting error. Here  just i am looking for ,do not  have any year field just have  month field with Jan to Aug sales information. i need to display Jan - Aug(jan Minus Aug )sales figures(current month). Please can you help me .

Thanks,

Rajesh

• ###### 4. Re: Current month minus first month of year calculation

Raja,

Then it will be

SUM(if Month(date)=1 then [Sales] end)

-

SUM(if Month(date)=Month(today()) then [Sales] end)

If only for Aug, then :

SUM(if Month(date)=1 then [Sales] end)

-

SUM(if Month(date)=8 then [Sales] end)

Thanks,

Michael Ye

2 of 2 people found this helpful
• ###### 5. Re: Current month minus first month of year calculation

Hi Michael,

i am trying below calculation but getting error like "expected closing parenthesis or comma while parsing argument list for sum"

SUM(Month([Reporting Month (copy)])=1 then [OPEX] end)

-

SUM(Month([Reporting Month (copy)])=Month(today()) then [OPEX] end)

• ###### 6. Re: Current month minus first month of year calculation

corrected:

SUM(if Month([Reporting Month (copy)])=1 then [OPEX] end)

-

SUM(if Month([Reporting Month (copy)])=Month(today()) then [OPEX] end)

1 of 1 people found this helpful
• ###### 7. Re: Current month minus first month of year calculation

Hi Michael,

Thanks for your help but the calculation is giving the same values of Jan month. Please can you help me exactly what i am looking for .

Thanks,

Rajesh

• ###### 8. Re: Current month minus first month of year calculation

Michael Ye

Data Source:

Jan and Aug:

Difference with calculations. It give s difference between the OPEX of Jan and Aug, which is 5-9=-4.

3 of 3 people found this helpful