Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
livio218526
Creator
Creator

Previous period by selected data from a picker

Hi everyone,
I need a hand from you.
The situation is as follows:

I have a picker for selecting the date (from - to) and, given the selection of a date, I need to be shown the previous period, for example:

Example 1:
I select from 01/02/2018 to 28/01/2018 and then the previous period must be -> from 01/01/2018 to 31/01/2018

Example 2:
I select from 01/03/2018 to 20/03/2018 and then the previous period must take into account the number of days in this case, so it should be -> from 10/02/2018 to 28/02/2018

Example 3:
I select from 01/08/2018 to 10/08/2018 and then the previous period must take into account the number of days in this case, so it should be -> from 07/07/2018 to 07/31/2018

The problem is that with the data picker, the value of the GetFieldSelection is a string, for example> = 01/01/2018 <= 31/01/2018 and so I save everything on variables in date format.

If something was not clear, tell me quietly.

Thank you so much for the support!

Labels (4)
1 Reply
livio218526
Creator
Creator
Author

**Example 3:
I select from 01/08/2018 to 10/08/2018 and then the previous period must take into account the number of days in this case, so it should be -> from 07/07/2018 to 31/07/2018