Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
tracer
Contributor
Contributor

Month to date

Dear all,

 

I want to use month to date function for my report. i'm using autocalender. The issue i'm facing is that my report must show date till previous day.

 

as now i have only data for June, I'm using bellow expressiona and it works fine.

 

Sum({<[Stroškovno mesto]={'7'},[Datum.autoCalendar.Date]={"$(='<'& (Today()))"}>}[Sales)])

 

the problem will be on 2nd of July, as may expression will show also data for June, which I do not want.

 

Thank you in advance for your suggestions.

 

kind regards,

 

Matej

 

 

 

 

Labels (1)
4 Replies
Or
MVP
MVP

You might want to consider using the built-in function, InMonthToDate()

https://help.qlik.com/en-US/qlikview/May2022/Subsystems/Client/Content/QV_QlikView/Scripting/DateAnd...

 

tracer
Contributor
Contributor
Author

Thank you for your response.

I want to use it, but I'm not sure how to set an expression to give me
Month to date on base date today - 1 day.

Kind regards

Matej


Or
MVP
MVP

Presumably, InMonthToDate(YourDate,Today()-1)? You might also want to combine this with InMonth(YourDate,Today()-1) if you're just looking for the current month.

matejb
Contributor
Contributor

Could you be so kind and  advise how to change bellow scipt

Sum({<[Stroškovno mesto]={'7'},[Datum.autoCalendar.Date]={"$(='<'& (Today()))"}>}[Sales)])