Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

fgillen1
New Contributor III

autoCalendar.YearMonth

Hi,

I am looking to use autoCalendar.YearMonth filter in an expression but it won't recognize 'Feb-2017'. It gives it in this format when i use it as a dimension in my charts.

qlik.JPG

Count(DISTINCT {<status={'Current'}, [RENDATE.autoCalendar.YearMonth] = {'Feb-2017'}>} ID) /

Count(DISTINCT {<[RENDATE.autoCalendar.YearMonth] = {'Feb-2017'}>} ID)

Anyone know the correct format?

Regards

Finbar

Tags (1)
1 Solution

Accepted Solutions
fgillen1
New Contributor III

Re: autoCalendar.YearMonth

Hi all,

Found the solution! I was using single quotations, only works with double quotations!! Its always something easy!! 

Count(DISTINCT {<status={'Current'}, [RENDATE.autoCalendar.YearMonth] = {"Feb-2017"}>} ID) /

Count(DISTINCT {<[RENDATE.autoCalendar.YearMonth] = {"Feb-2017"}>} ID)

15 Replies
thevingo
Contributor

Re: autoCalendar.YearMonth

Hi

I've not fully worked on Qliksense, What is autoCalender, is it a keyword?

I think you're using extensions.

mark6505
Valued Contributor III

Re: autoCalendar.YearMonth

Hi,

I would normally write my own caledar script as that way you can control how the dates are formatted.

But if the Auto formating has year month your will have to either reformat the dates in script or the easier option is change you set analysis to match,

So

Count(DISTINCT {<status={'Current'}, [RENDATE.autoCalendar.YearMonth] = {'2017-Feb'}>} ID) /

Count(DISTINCT {<[RENDATE.autoCalendar.YearMonth] = {'2017-Feb'}>} ID)

Mark

fgillen1
New Contributor III

Re: autoCalendar.YearMonth

AutoCalender is a default Qlik has. It picks up your date fields and adds dimensions like Year Quarter, Month etc.

fgillen1
New Contributor III

Re: autoCalendar.YearMonth

Hi Mark,

I manipulated the code to read '2017-Feb' but still not working

mark6505
Valued Contributor III

Re: autoCalendar.YearMonth

Hi Finbar,

Just having a look and the formating seem correct ie. '2017-Feb', check the feild name is correct.

I would advised adding a field to the dashbaord as a filter and check the name and Format is as expected.

Mark

fgillen1
New Contributor III

Re: autoCalendar.YearMonth

Hi Mark,

Done that! I honestly can't think of what the problem might be. I have double checked everything

mark6505
Valued Contributor III

Re: autoCalendar.YearMonth

Yer it does seem odd.

The next step i take when trouble shooting set analysis issue if make sure the problem is with the part you expect. So remove the Dates and make sure you get a result

Count(DISTINCT {<status={'Current'}>} ID) /

Count(DISTINCT ID)

If that work that split the set analysis into two and make sure both work before trying to join the together. So

Measure 1

Count(DISTINCT {<status={'Current'}, [RENDATE.autoCalendar.YearMonth] = {'2017-Feb'}>} ID)

Measure 2

Count(DISTINCT {<[RENDATE.autoCalendar.YearMonth] = {'2017-Feb'}>} ID)

Mark

sasiparupudi1
Honored Contributor III

Re: autoCalendar.YearMonth

Try

Count(DISTINCT {<[RENDATE.autoCalendar.YearMonth] = {201702}>} ID)

sasiparupudi1
Honored Contributor III

Re: autoCalendar.YearMonth

Or Try

Count(DISTINCT {<[RENDATE.autoCalendar.YearMonth] = {"$(=MonthStart(Today()))"}>} ID)


Yearmonth is calculated as below

Dual(Year($1)&'-'&Month($1), monthstart($1)) AS [YearMonth]