Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Highlighted
divya_anand
Contributor II

Help - writing expression for a monthly chart using date field

Hi all,

Any suggestions on writing the expression for the below case that I would like to see on a Monthly bar chart (Month is the dimension)

ScheduledDate<=MonthEnd of every month

Jan: count of all tickets where scheduledDate <=Jan (including jan 2016,dec 2015, nov 2015 & so on)

Feb: count of all tickets where scheduledDate <=Feb (including feb 2016, jan 2016,dec 2015, nov 2015 & so on)

Mar: count of all tickets where scheduledDate <=Mar etc

Thank you in advance.

1 Solution

Accepted Solutions
neelamsaroha157
Valued Contributor II

Re: Help - writing expression for a monthly chart using date field

Take a look if this is what you are looking for.

View solution in original post

7 Replies
neelamsaroha157
Valued Contributor II

Re: Help - writing expression for a monthly chart using date field

Are you looking for something like this

Count({$<ScheduledDate={"<$(=MonthEnd(Max(Date)))"}>}tickets)

divya_anand
Contributor II

Re: Help - writing expression for a monthly chart using date field

Hi Neelam,

Thank you for the response.

The date field for the month(dimension) and the scheduled date are the same in my case. ie. the month(dimension) is nothing but month(ScheduledDate). So, given your expression I should actually be using

Count({$<ScheduledDate={"<$(=MonthEnd(Max(ScheduledDate)))"}>}tickets)

This ain't working. Do you have any suggestions for this case?

MVP
MVP

Re: Help - writing expression for a monthly chart using date field

Could you post a sample qvw and explain your expected output?

kalyanivintha1
Contributor II

Re: Help - writing expression for a monthly chart using date field

Try like this...

expression as

=Count({<ScheduledDate={">=$(=ScheduledDate)  <=$(=MonthEnd(Max(ScheduledDate)))"}>}tickets)

divya_anand
Contributor II

Re: Help - writing expression for a monthly chart using date field

Hi Tresesco,

Here is a picture of what I am working towards having-

Thank you for the response & Let me know in case you need more information.

neelamsaroha157
Valued Contributor II

Re: Help - writing expression for a monthly chart using date field

Take a look if this is what you are looking for.

View solution in original post

divya_anand
Contributor II

Re: Help - writing expression for a monthly chart using date field

Hi Neelam,

This works perfect. Thanks a ton.