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

Current Month

I want to reference the current month in my expression, so that I can sum sales that are current month -1,-2 etc

Can this be done?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Sure,

like

sum({<DisburseDate={">=$(=monthstart(today(),-2))<$(=monthstart(today(),-1))"},Status = {'Active'}, Main = {1}, AgreementAgeDays = {">=45"} >} SaleAmout)

Stefan

View solution in original post

21 Replies
Not applicable
Author

Hi,

you can get the current month with the expression: month(today())

Hope this help

Regards!

swuehl
MVP
MVP

Yes, should be possible.

you are talking about Sales month to date, previous month to date?

This can be done with set analysis, please have a look into

http://iqlik.wordpress.com/2010/11/27/the-magic-of-set-analysis-point-in-time-reporting/

Or also Set Analysis in the Help file.

Stefan

Not applicable
Author

I have tried this but it doesnt work?

sum ({$<SalesDate = {$(=month(today()),-2))

Not applicable
Author

I have tried this but it doesnt work?

sum

({$<SalesDate = {$(=month(today()),-2))

pduplessis
Partner - Contributor III
Partner - Contributor III

Is SalesDate a month number or a date? SalesDate cannot = Month# if its a date...

Not applicable
Author

sorry missed some of the expression

sum ({$<DisburseDate = {$(=month(today()),-2)

},

= {Active}, Main = {1}, AgreementAgeDays = {'>=45'}>}Sales)

pduplessis
Partner - Contributor III
Partner - Contributor III

try Sum({$<SalesDate={'$(=something that returns a date in the same format as SalesDate)'}>} Field)

Not applicable
Author

yes its a date

swuehl
MVP
MVP

Hi,

your sum misses the expression to sum, and the limitiation of dates might need a change:

like this?

sum({<SalesDate={">=$(=monthstart(today()))"} >} Sales)