Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Month start date

How to get the month start date for eg:11/01/2012 from a date field?

i am trying to do a MTD trend.

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

this is the way i got it worked

sum({ <[Received Date]={">=$(=monthstart(date(max([Received Date]))) )<=$(=monthend(date(max([Received Date]))))"}> }[Loan Counter])

View solution in original post

8 Replies
kouroshkarimi
Creator III
Creator III

=monthstart(yourdatefield) should work?

Not applicable
Author

yes that does work is there any way that i could use this and write monthtodate wherein i need the show a trend

eg:

start date:11/01/2012

end date:11/27/2012

do a trend showing all the values, how can i do that?

Not applicable
Author

if(month(today())&year(today())=month(Date)&Year(Date),1,0) As MTD_FLAG

Not applicable
Author

yes that does work is there any way that i could use this and write monthtodate wherein i need the show a trend

eg:

start date:11/01/2012

end date:11/27/2012

do a trend showing all the values, how can i do that?

jagan
Partner - Champion III
Partner - Champion III

HI,

Create a variable for start and end dates like below

vStartDate = MonthStart(Max(DateDimension))

vEndDate = If(MonthName(Max(DateDimension)) = MonthName(Today()), Today(), MonthEnd(Max(DateDimension)))

Now use this variables in expression

=Sum({<DateDimension = {'>=$(=vStartDate)<=$(=vEndDate'}>} Sales)

Hope this helps you.

Regards,

Jagan.

Anonymous
Not applicable
Author

Hi,

Are you talking about daily sales trend for a month? Add below condition in your exression and use the date field as a dimension.

monthstart(datefield)=monthstart(today())

Thx,

Satya

Not applicable
Author

Yes i need to show consecutive daily month trend where datefiled range is from

month starting to current date.(eg:11/01/2012 to11/28/2012) each every day count(orders).

Not applicable
Author

this is the way i got it worked

sum({ <[Received Date]={">=$(=monthstart(date(max([Received Date]))) )<=$(=monthend(date(max([Received Date]))))"}> }[Loan Counter])