Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Gerard
Contributor
Contributor

Solved: Sum if with month(today()) not working

HI All,

I'm not getting this formula to work:

Sum({<
[Period date year] = {"$(=year(AddMonths(today(), -1)))"},
[Period] = {"$(=month(today()))"}
>} [Amount in EUR])

This however is working:

Sum({<
[Period date year] = {"$(=year(AddMonths(today(), -1)))"},
[Period] = {3}
>} [Amount in EUR])

Where I replaced the month formula with 3. When I do months(today()) in a seperate formula it returns 3 as expected.

So I'm puzzled.... Does anyone understand why this is not working ?

 

Thanks for your time !

Gerard

 

1 Solution

Accepted Solutions
Taoufiq_Zarra

and if you test :

Sum({<
[Period date year] = {"$(=year(AddMonths(today(), -1)))"},
[Period] = {"$(=num(month(today())))"}
>} [Amount in EUR])

?

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

3 Replies
Taoufiq_Zarra

and if you test :

Sum({<
[Period date year] = {"$(=year(AddMonths(today(), -1)))"},
[Period] = {"$(=num(month(today())))"}
>} [Amount in EUR])

?

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Gerard
Contributor
Contributor
Author

Thanks Taoufiq ! This did the trick.

Much appreciated !

NitinK7
Specialist
Specialist

Hi Gerard,

try following Expression

it will working.

Sum({<
[Period date year] = {"$(=Year(AddMonths(today(), -1)))"},
[Period] = {"$(=Num(Month(today())))"}
>} [Amount in EUR])

 

regards,

Nitin.