Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

starheartbeam
Contributor

Month to Date

How would one get Month to date?

I have a "customer", "search", "currentDate"

I am trying to get a count of search that equal 'true' per customer month to date.  So like today being 9/4 I would want this count to be for all true for 9/1, 9/2, 9/3 and 9/4.

I have "customer" picked as a dimension.

and have tried

COUNT({<search = {'true'} , CurrentDate = {'$(=Date(Month()))'}>}search)

I have also tried pulling out the Month in my LOAD "CurrentMonth" and put that in the place of CurrentMonth but that did not get me anywhere.


5 Replies
MVP
MVP

Re: Month to Date

count({$ <search={true} , CurrentDate={">=$(=MonthStart(Today()))<=$(=Today())"}>} search)

starheartbeam
Contributor

Re: Month to Date

Thank you for the reply.  I tried this and it is just giving me 0 for everything.  Any ideas?

ogster1974
Honored Contributor II

Re: Month to Date

I think your issue is you are treating true/false as text rather than 1/0 i've attached a sample.

ogster1974
Honored Contributor II

Re: Re: Month to Date

That didn't load here are some screen shots

Example report.jpg

you need to filter on 1 rather than true to fix your issue.

Expression.jpg

ogster1974
Honored Contributor II

Re: Month to Date

Here is the example.  Hope this helps.

Community Browser