Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
bekahbeets
Creator
Creator

Get the dates from the range set by the Climber Selection Bar extension

I use the Climber Selection Bar Extension and I use the datepicker... this is a short tutorial on how to the get the startdate and enddate into a variable.

1. Grab the range returned when the user selects a range

GetFieldSelections([Date of Service]) //i made a variable called vDOSRange with this formula

Note: [Date of Service] is the list for the datepicker

Returns: >=3/17/2016<=4/17/2017

2. Make it text and take out the <,>,= symbols and put in a comma with no spaces

Replace(Replace(text($(vDOSRange)), '>=', ''), '<=', ',')

Returns: '3/17/2017,4/17/2017'

3. Use SubField() to get the string before the comma (Final code for StartDate)

Subfield(Replace(Replace(text($(vDOSRange)), '>=', ''), '<=', ','), ',', 1)

Returns: '3/17/2016'

4. Use SubField() to get the string after the comma (Final code for EndDate)

Subfield(Replace(Replace(text($(vDOSRange)), '>=', ''), '<=', ','), ',', 2)

Returns: '4/17/2017'

2 Replies
ninjasoft
Contributor
Contributor

where do you put this expression? Don't really have a good grasp for this extension

bekahbeets
Creator
Creator
Author

either in the expression editor for the dimension or measure(whichever you need) or into the system variables