Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table that looks like -
I have to only show values till the previous month that is till Sept and the rest (Oct, Nov, Dec, Jan, Feb, Mar) should come as 0.
Since values exist for all the months, so it coming but I only want to show till the previous month.
Can anyone help?
YTD until Previous Month
sum({<Datefield={">=$(=Date(Yearstart(today())))<=$(=Date(MonthEnd(today(),-1)))"}>}Measurefield)
or
To date until previous month
sum({<Datefield={"<=$(=Date(MonthEnd(today(),-1)))"}>}Measurefield)
Have you set up a financial year in script. Say 2022/23 that is linked to April 2022 to march 2023 etc.
My answer will vary if you have or haven't
I assume you have Monthyear set up in your calendar. And what about MonthsAgo? You need MonthYear but the rest aren't so important
Example of this is below. Datecanon is just the date you use for a master calendar
Year(Today())-Year(DateCanon) AS [YearsAgo] ,
12*(Year(Today())-Year(DateCanon)) + Month(Today()) - Month(DateCanon) as MonthsAgo,
(Weekend(Today(),0,-2) - Weekend(DateCanon,0,-2))/7 as WeeksAgo ,Today() - DateCanon as DaysAgo,
Week (DateCanon) AS WeekNum,
MonthNAME (DateCanon) ) as MonthYear ,