# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Uploads getting stuck in the virus scanner. We are investigating.
cancel
Showing results for
Did you mean:
Highlighted Contributor III

## Set analysis smaller than current Month

Hi,

I am trying to get Sales smaller than current month.

Below works fine for current month.

Sum({\$<Month={'\$(=Month(Today()))'}>}[Sales])

Sum({\$<Month={<='\$(=Month(Today()))'}>}[Sales])

It doesn't work. I tried so many variations..

Some help would be very much appreciated!

1 Solution

Accepted Solutions
Highlighted MVP

What is the format of your month field?

Try creating a numeric month field

Month(Date) as Month,

Num(Month(Date)) as MonthNum,

...

Then

Sum({\$<MonthNum ={"<=\$(=Num(Month(Today())))"}>} [Sales])

5 Replies
Highlighted MVP

Try this:

Sum({\$<Month={'<=\$(=Month(Today()))'}>}[Sales])

Highlighted MVP

What is the format of your month field?

Try creating a numeric month field

Month(Date) as Month,

Num(Month(Date)) as MonthNum,

...

Then

Sum({\$<MonthNum ={"<=\$(=Num(Month(Today())))"}>} [Sales])

Highlighted MVP

Or you can also use DateField:

Sum({\$<Month={"\$(='<' & Date(MonthStart(Today()), 'DateFieldFormatHere'))"}>} [Sales])

Highlighted Contributor III

Thanks, does Qlik not understand the expression without nummeric value? Kind of strange, no?

Highlighted MVP  