# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor III

## 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)

1 Solution

Accepted Solutions
MVP

## 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)

4 Replies
MVP

## 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)

New Contributor III

## Re: Set Analysis Date range

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

MVP

## Re: Set Analysis Date range

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

MVP

## 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...