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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: 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
Champion III
Champion III

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

Regards

Anand

View solution in original post

10 Replies
jagan
Partner - Champion III
Partner - Champion III

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
Champion III
Champion III

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

Regards

Anand

jagan
Partner - Champion III
Partner - Champion III

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
Partner - Champion III
Partner - Champion III

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.