Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

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)

View solution in original post

15 Replies
thevingo
Creator
Creator

Hi

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

I think you're using extensions.

Mark_Little
Luminary
Luminary

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

Anonymous
Not applicable
Author

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

Anonymous
Not applicable
Author

Hi Mark,

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

Mark_Little
Luminary
Luminary

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

Anonymous
Not applicable
Author

Hi Mark,

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

Mark_Little
Luminary
Luminary

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
Master III
Master III

Try

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

sasiparupudi1
Master III
Master III

Or Try

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


Yearmonth is calculated as below

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