Help with expression summing a value for a month

Here’s an expression to sum monthly expenditure amount of people based on a few criteria:

sum(
select(
User expense submissions[Amount],
AND(
(month([Date]&year([Date])=month(today())&year(today())), //for 31/3/2020, the expression is 32020
([User]=[_THISROW].[Name]), //The column that holds the current user name
([Indirect?] = “FALSE”) //just another yes/no condition checked
)
)
)

I don’t know why it is summing to 0.
I know this is the last day of the month and time zones may differ, so I have also tried using (month(today())-1)&year(today()). Still a zero.

Maybe the (month([Date]&year([Date]) is taking text values instead of number? The description in the space below where the expression is entered does say “Concatenation of text values”.

If that’s so, I don’t have any way to change it to a number type.

Solved Solved
0 3 628
1 ACCEPTED SOLUTION

I have solved this. The trick was to use the number() function around the (month()&year()) function that converts the string to a number, had it taken a text value by the concatenate() function.

View solution in original post

3 REPLIES 3
Top Labels in this Space