4 Replies Latest reply: Mar 21, 2018 8:40 AM by Sunny Talwar

# Set Analysis Date range

Hello,

I use this formula in my bar chart.

Sum({<Month = {"\$(='>=1<=' & Num(Month(Max({1}Date))))"}, Year>} Measure)

I have information until March 12 and this calculates me  Sum in January February and March in all of the years. I want to have the sum in all of these years until March 12 . I added the day , but it doesn't work correctly

Sum({<Month = {"\$(='>=1<=' & Num(Month(Max({1}date))))"},

Day= {"\$(='>=1<=' & Num(Day(Max({1}date))))"}, Year>} FactSoldAmount)

• ###### Re: Set Analysis Date range

Try this

Sum({<Date = {"=SetDateYear(Only({1} Date), Year(Today())) <= SetDateYear(Max({1} TOTAL Date), Year(Today()))"}, Year, Month>} Measure)

• ###### Re: Set Analysis Date range

It works Thanks !!!!!!!!!!!  I really appreciate your help

• ###### Re: Set Analysis Date range

Excellent... this is the first time I can see use of this function..!!!

• ###### Re: Set Analysis Date range

... Ya this get rarely used, but can come in handy when we have to disregard the year part and make decision based on day and month...