Why I cant to write so to compare 2 values? Expression result here is YES/NO I think:
MONTH(orders[order_date]) & YEAR(orders[order_date]) = MONTH(TODAY()) & YEAR(TODAY())
but it is right: MONTH(TODAY())&YEAR(TODAY()) = 32022
Solved! Go to Solution.
For matching:
AND(
MONTH([order_date]) = MONTH(TODAY),
YEAR([order_date]) = YEAR(TODAY)
)
For calculating the number of months between two dates:
MONTH([date2]) - MONTH([date1]) +
IF( YEAR([date2]) = YEAR([date1]),
0,
12 * (YEAR([date2]) - YEAR([date1])
)
Your expression is all wrong.
Please read the following guides:
Expressions: The Essentials | AppSheet Help Center
It can be good compared as text, and it works:
IF( IN("*", SELECT(orders[price],
AND([hUID] = [_THISROW].[hUID],
text([order_date])&year([order_date])) = text(MONTH(TODAY())&YEAR(TODAY()))
))), "1", "")
---- But I looking for any formula to compare month quantity between 2 dates, like DATEDIF (what works in GoogleSheets. Is here any same? Or what is better way to calculate how many months between 12.10.2021 and 05.03.2022 ?
For matching:
AND(
MONTH([order_date]) = MONTH(TODAY),
YEAR([order_date]) = YEAR(TODAY)
)
For calculating the number of months between two dates:
MONTH([date2]) - MONTH([date1]) +
IF( YEAR([date2]) = YEAR([date1]),
0,
12 * (YEAR([date2]) - YEAR([date1])
)
Thanks, I understood concept 🙂
User | Count |
---|---|
18 | |
15 | |
10 | |
7 | |
4 |