Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
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)
Hi
I've not fully worked on Qliksense, What is autoCalender, is it a keyword?
I think you're using extensions.
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
AutoCalender is a default Qlik has. It picks up your date fields and adds dimensions like Year Quarter, Month etc.
Hi Mark,
I manipulated the code to read '2017-Feb' but still not working
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
Hi Mark,
Done that! I honestly can't think of what the problem might be. I have double checked everything
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
Try
Count(DISTINCT {<[RENDATE.autoCalendar.YearMonth] = {201702}>} ID)
Or Try
Count(DISTINCT {<[RENDATE.autoCalendar.YearMonth] = {"$(=MonthStart(Today()))"}>} ID)
Yearmonth is calculated as below
Dual(Year($1)&'-'&Month($1), monthstart($1)) AS [YearMonth]