Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Last 6 months - Line Chart

Per other blogs I have the below expression. I would like to only display the lattest 6 months.

Current Expression that I'm using below but nothing has changed. Could it be that MC_SERVICE_DATE_YYYMM is not in a date format?

SUM({<MC_SERVICE_DATE_YYYYMM={'>$(=AddMonths(Max(MC_SERVICE_DATE_YYYYMM),-6))'}>} TOTAL_PHONE_CONTACTS)

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

My dimesion is not a date. I was able to only display x values by using the Dimesion Limits tab to show FIRST x values, worked great.

View solution in original post

6 Replies
sinanozdemir
Specialist III
Specialist III

Hi,

Could be. Try to put Max() function in a Date(Max(MC_SERVICE_DATE_YYYYMM), 'Your Date Format')

Anonymous
Not applicable
Author

Can you provide an example of how the full expresion should look?

Anonymous
Not applicable
Author

The sums are correct but my current expression is not displaying only 6 months/values

sinanozdemir
Specialist III
Specialist III

Since I don't know your date format, but you can use 'MM/DD/YYYY' or 'YYYY-MM-DD' in 'Your_Date_Format' field. This should work:

SUM({<MC_SERVICE_DATE_YYYYMM={'>$(=AddMonths(Date(Max(MC_SERVICE_DATE_YYYYMM),'Your_Date_Format'),-6))'}>}TOTAL_PHONE_CONTACTS)

Anonymous
Not applicable
Author

My dimesion is not a date. I was able to only display x values by using the Dimesion Limits tab to show FIRST x values, worked great.

jonas_rezende
Specialist
Specialist

Try:

SUM({<MC_SERVICE_DATE_YYYYMM={">$(=AddMonths(Max(MC_SERVICE_DATE_YYYYMM),-6))"}>} TOTAL_PHONE_CONTACTS)


or


SUM({<MC_SERVICE_DATE_YYYYMM={">$(=Date(AddMonths(Max(MC_SERVICE_DATE_YYYYMM),-6)))"}>} TOTAL_PHONE_CONTACTS)



Anyway, replace simple quote for double-quote.



Hope this helps!