Hello expert, I have a field month as string with below values. I want to build a dynamic filter which will only select month greater than equal to current month. (Eg. If I run today, the filter should select month as >=5).
I have build below formula, which works fine, if month are in single digit and does not work if two digits (like below case). I cannot change the month type to measure.
[Month] > ToString(DateTimeMonth(DateTimeNow())-1)
01
02
03
04
05
06
07
08
09
10
11
12
Solved! Go to Solution.
your problem is that 01 is a string - not an integer to so you need to adjust:
tonumber([month]) > tonumber(datetimemonth(dattimenow()))-1
If your Month field has to be a String you can force the data type to a number for the calculation - ToNumber([Month]) > DateTimeMonth(DateTimeNow())-1