Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

smitaranikr04
New Contributor III

Range of Quarter

Hi Guys..I have field Quarter which has quarter value as 3Q14, 4Q14 like that, How can i select range of quarter selected.

For example i want to select quarter range from 3Q13 to 2Q14. I tried with input box but its not working ,its working only for date.

Please help me

1 Solution

Accepted Solutions
MVP
MVP

Re: Range of Quarter

As I said it would be a workaround (because the best option is to create quarter using QuarterName() function to get proper date representation that allows comparison unlike this text.).

PFA for alternate solution.

8 Replies
MVP
MVP

Re: Range of Quarter

Possibly, it is not working because your quarter dimension is merely a text representation and not a proper date. Still there would be work around, could you please post a sample?

smitaranikr04
New Contributor III

Re: Range of Quarter

Example i have Target_Quarter and Sales field.

Target_Quarter    Sales

    1Q12                10

    2Q12                20

    3Q12                30

    4Q12                10

    1Q13                18

    2Q13                17

    3Q13                20

    4Q13                21

    1Q14                25

    2Q14                10

    3Q14                16

    4Q14                17

its just a small example, if suppose i want to see sales of only 2Q12 to 1Q14??only that range should be selected.How can i achieve this.

Not applicable

Re: Range of Quarter

Hi,

I don't understand your question. What is the problem in selecting the range of values from a Qtr list box?

do you have any issues in sorting order? or you want to handle it in expression? can you pls elaborate your requirement

smitaranikr04
New Contributor III

Re: Range of Quarter

Hi Gowri, this is small example that has very less data, here i can select quarter from list box itself but in my application many quarters are there, How could I select with input box so that if i enter start quarter and end quarter, all the quarter in that range will be selected.

sujeetsingh
Honored Contributor III

Re: Range of Quarter

Split it in the script only .

Not applicable

Re: Range of Quarter

Hi,

Your problem will be solved if you fromat the value as below

12Q1

12Q2

12Q3

12Q4

13Q1

13Q2

Let say if you are particular about your exisiting format, then you may have to use some logical island for selection as a work around

MVP
MVP

Re: Range of Quarter

As I said it would be a workaround (because the best option is to create quarter using QuarterName() function to get proper date representation that allows comparison unlike this text.).

PFA for alternate solution.

smitaranikr04
New Contributor III

Re: Range of Quarter

Hi tresesco thanx a lot..It worked for me and this is what i wanted. thanx again

Community Browser