SUM value of current month

hello guys,

i'm setting a bot that advice me when i'm in overbudget in current month. To do this, i have to sum the value [Importo] of current month extracted by the column [Data] 

i used this expression in bot condition

SUM( SELECT( Spese[Importo], [Data] = MONTH(TODAY())) ) >SUM(Bilancio[Limite_mensile])

but it doesn't work correctly.. the problem is in [Data] = MONTH(TODAY())) 

If i use only TODAY() it's work.. 

 

Solved Solved
0 7 151
1 ACCEPTED SOLUTION

MONTH([DATA]) = MONTH(TODAY())

View solution in original post

7 REPLIES 7

I think u should create vc in both tables like this: TEXT([DATE], "MM/YYYY") and compare them in the SELECT formula

and how can i compare these vc in SELECT formula?

SUM( SELECT( Spese[Importo], [Data vc] = [_thisrow].[Data vc] )

 

 

MONTH([DATA]) = MONTH(TODAY())

i solved in this way with your suggest 

SUM(
SELECT( Spese[Importo],
AND( MONTH([DATA]) = MONTH(TODAY()), YEAR([DATA])=YEAR(TODAY())
)))

Well done!

Another way is to use TEXT() functions for a shorter expression

SUM(
SELECT( Spese[Importo],
 TEXT([DATA],"YYMM") = TEXT(TODAY(),"YYMM")

              )

        )

https://help.appsheet.com/en/articles/3517328-text

 

Edit:  I had not looked at earlier suggestion by @diogolupcosta which is almost similar.

Top Labels in this Space