Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All, How do I define a variable which holds all months(separated by comma) less than current month in a variable?
Cheers!
Assuming your months are defined as dates (like the first of the month, formatted to not show the day), then I believe this:
=concat({<Month={"=Month<monthstart(today())"}>} distinct Month,',',Month)
Thanks John!
I tried this but my variable didn't return anything.. I think I am doing something wrong,
Here is my requirement:
If current month is Sept, my variable should return - Jan, Feb, Mar, Apr, May, Jun, Jul, Aug(i.e Months in MMM format separated by commas).
Thanks!
How are your months defined?
I read the current date from Today() function.
So I use Month(Today()) to get current month.
I want to use a variable which will store all MTD Months separated by commas(eg: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug).
Please let me know if you need anything further.
OK, if you're using month(today()) to get the current month, then I'm guessing you're using month(Date) as Month instead of monthstart(Date). In that case, just replace my monthstart() with month(). Hopefully this does the trick?
=concat({<Month={"=Month<month(today())"}>} distinct Month,', ',Month)