Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

month YTD vs Month lastyr

Hi Experts,

i have the following expression in a chart.


Expr 1

=sum({<DEC_WeekStart = {">=$(=Weekstart(today(),-12,$(vCal_FD)))<=$(=weekstart(today(),0,$(vCal_FD)))"}>} sales)

Expr 2

=sum({<DEC_WeekStart = {">=$(=Weekstart(addyears(today(),-1),-12,$(vCal_FD)))

=$(=weekstart(addyears(today(),-1),0,$(vCal_FD)))"}>}sales)

these two expressions deals with the calculation of sales value for recent 12 weeks of this yr and the same for prev year.

($(vCal_FD) is the variable to make the weekstart as saturday)

Now, i need to calculate the monthly figures for this yr and prev yr like the same above expressions.

the graph for weeks performance is attached below.

sample.JPG

like this, i need to provide the monthly performance.

how can i do this.

pls help.

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

May be,

=SUM({<Date = {">=$(=MonthStart(Today()),-11)<=$(=MonthEnd(Today()))"}>}sales)

and

=SUM({<Date = {">=$(=MonthStart(AddYear(Today(),-1)),-11)<=$(=MonthEnd(AddYear(Today(),-1)))"}>}sales)


Also use, Month=, Year=, Quarter to bypass

View solution in original post

3 Replies
Gysbert_Wassenaar

In your chart replace the DEC_WeekNumber dimension with your Month dimension.


talk is cheap, supply exceeds demand
MK_QSL
MVP
MVP

May be,

=SUM({<Date = {">=$(=MonthStart(Today()),-11)<=$(=MonthEnd(Today()))"}>}sales)

and

=SUM({<Date = {">=$(=MonthStart(AddYear(Today(),-1)),-11)<=$(=MonthEnd(AddYear(Today(),-1)))"}>}sales)


Also use, Month=, Year=, Quarter to bypass

Not applicable
Author

thank u manish