Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
MR_Challaa
Contributor
Contributor

SET ANALYSIS

I HAVE ONE YEAR DATA.

HOW TO GET SUM OF SALES FOR THE LAST 6 MONTHS IN A TEXT OBJECT.

AND 

 WE  SHOULD NOT DO ANY CHANGES IN SCRIPT LEVEL.

 

REGARDS

2 Replies
lironbaram
Partner - Master III
Partner - Master III

Hi,
You can use something like this.
Assuming you have a Date field called DateField.

sum({<DateField={">=$(=monthstart(addmonths(max(DateField),-5))"}>}Sales)
anthonyj
Creator III
Creator III

Hi,

You can add a measure in you text object without any changes to the model. The measure would look like this.

sum({$<DateField={">=$(=monthstart(today(0),-5))"}>}Sales)

Regards

Anthony