Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i want the set analysis expression for YTD aand MTD for year april 2022 to march 2023
Set variables as
vDate_1 =Date('01/04/2022', 'DD/MM/YYYY')
vDate_2 =Date('31/03/2023', 'DD/MM/YYYY')
YTD expression:
=Sum({<Date={">=$(vDate_1) <=$(vDate_2)"}>}Sales)
MTD expression (eg: for Month of March 2023)
=Sum({<Date={">=$(=MonthStart(vDate_2)) <=$(=MonthEnd(vDate_2))"}>}Sales)
General expression for YTD and MTD:
YTD
Sum( { < OrderDate = {" >=$(=YearStart(Today())) <=$(=Today()) "} >} Sales)
MTD
Sum({ < OrderDate = {" >=$(=MonthStart(Today())) <=$(=Today()) "} >} Sales)