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

GetFieldSelections with date dimension not returning value

Hi,

I'm trying to get the selected dates, but don't seem to GetFieldSelections function to return a value.

In my app the user can choose the data display period (year, quarter, month, day) via qsVariable extension. So I've created a master dimension like this: =Pick(Match($(vSalesView),1,2,3,4),[datestr.autoCalendar.Year],[datestr.autoCalendar.YearQuarter],[datestr.autoCalendar.YearMonth],[datestr.autoCalendar.Date]). This works fine.

So now I would like to display the selected dates in a text box and I wrote the following expression:

GetFieldSelections(Pick(Match($(vSalesView),1,2,3,4),[datestr.autoCalendar.Year],[datestr.autoCalendar.YearQuarter],[datestr.autoCalendar.YearMonth],[datestr.autoCalendar.Date]))

But this does not return any values when a selection is made

If I choose any other dimension, for example Customers, everything works fine. What am I doing wrong?

12 Replies
Anonymous
Not applicable
Author

It's a shame I can't mark two answers correct. But thank You very much Sunny!

Sorry I wasn't clear before about the 400. Basically my goal is to make YoY comparison based on selected dates. So when user selects Jan 2018 and March 2018, I would also like to calculate the sum of Jan 2017 and March 2017. Or basically, whatever selection the user makes I want to display YoY change based on that selection taking into account that user might select random dates not a range.

sunny_talwar

I think it might help to look at this thread for comparisons

The As-Of Table

There are other ways to handle YoY comparisons... but if you plan to use date/Year/Month as a dimension, you will have a easy time by creating an As Of Table.

Anonymous
Not applicable
Author

Thanks, I will look into that.

Once again, thank You very much for all the help!