Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
g23
Contributor III
Contributor III

Creating a variable using GetSelectionField

Dear All, I have a month field dimension MONTH_STRING=Date(Date#([Data.autoCalendar.Month],'MMM'),'MMMM') What I would like to do is to create a variable for MONTH_STRING that allows me to select one or more months. I tryied to create a variable using GetSelectionField such as: vMonth=GetFieldSelections((Date(Date#([Data.autoCalendar.Month],'MMM'),'MMMM')),',',12) but it doesn't seam to work. Can you guys please help me understand how can I write a variable for MONTH_STRING that allows me to select one or more than one month? Thanks in advance

4 Replies
sunny_talwar

GetFieldSelections only uses FieldName... manipulations like Date() and Date#() won't work... may be use Concat instead with GetSelectedCount() to check if selection has been made or not

If(GetSelectedCount([Data.autoCalendar.Month]) > 0,
Concat(DISTINCT Date(Date#([Data.autoCalendar.Month], 'MMM'), 'MMMM'), ',')
)

 

g23
Contributor III
Contributor III
Author

This is not working 😞

sunny_talwar

Would you be able to share a sample where we can see the issue?

g23
Contributor III
Contributor III
Author

I don't have data to show you. What I can show you is what I am trying to do with the MONTH_STRING field I have create.

I have insert this is field in a filter panel:

 Month.PNG

and I want to be able (with a variable) to display the month/months that I have selected in this filter panel

Text area.PNG