Skip to main content
Announcements
Do More with Qlik - Qlik Cloud Analytics Recap and Getting Started, June 19: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
jduenyas
Specialist
Specialist

Multiple Selection Within a Field

Hi all

I have created a macro to select multiple months within a YearMonth field (2013 Dec, 2014 Jan ... etc)  that contains a list of rolling months.

The macro is being called from 3 buttons for most commonly selected months ie. YTD (Jan through current month) , last 6 months and last 12 months which can span over 1 or 2 years.

Is it possible to do this selection without using a macro? (using QV built in functionality and probably variables(?))

Actions in a button allow to Select in Field whereas a field can be specified but how can a specify a range of months?

Thanks

PS the macro I have created works fine but reading some "bad" things about macros I am trying to learn the "correct" ways of moving around

All the best

Josh

1 Solution

Accepted Solutions
its_anandrjs

In Search string write (A|D) with open and close brackets.

Regards

Anand

View solution in original post

10 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Can you attach a sample file?  You can achieve this by using Select in Field trigger with Concat and set analysis.

Regards,

jagan.

ashfaq_haseeb
Champion III
Champion III

Hi,

You can try like this

(Value1|Value2)

Regards

ASHFAQ

jduenyas
Specialist
Specialist
Author

How should the Concat work in an Action command?

Attached is a sample

Thanks

jduenyas
Specialist
Specialist
Author

See my replay to Jagan

A sample is attached following your suggestion but it doe not work.

Thanks

its_anandrjs

In Search string write (A|D) with open and close brackets.

Regards

Anand

jagan
Luminary Alumni
Luminary Alumni

Hi Jost,

You need to give below as Search String then it works.

(A|B|C|D)

Regards,

jagan.

jduenyas
Specialist
Specialist
Author

Actually it does work.

Before I did not have the parenthesis but after adding them it does work.

(What difference do the parenthesis do?)

Thanks

jagan
Luminary Alumni
Luminary Alumni

Hi,

The syntax is like that, you have to give Parenthesis. If you do not give then Qlikview considers it as Syntax error.

Regards,

Jagan.

b_garside
Partner - Specialist
Partner - Specialist

Is there a way to do this with Concat function, but allow values that have spaces?

Right now I cant get concat to do ("Value One"|"Value Two")  instead it does (Value On|Value Two)  which wont work unless the values have no spaces.  (ValueOne|ValueTwo)  need syntax to add quotes around the strings.