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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

explination of this expression?


=Alt(


WildMatch(


GetFieldSelections(%Dimensions, '|'),


'*Country*')

,0
1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Consider that you have below in your script...

Dimensions:

Load * Inline

[

  %Dimensions

  Customer

  Country

  Sales

  Purchase

];

Now considering that you have a list box %Dimension

Let me break this expression so better to understand.......


GetFieldSelections(%Dimensions, '|')

The above expression will give you List of All selected values from List box %Dimension

Consider that you have selected Country and Customers, it will give you result as below

Country|Customer

WildMatch(GetFieldSelections(%Dimensions, '|'),'*Country*')

WIldMatch will check that from the selected values of %Dimension, is there any values named Country or not?

For above example, where we have result Country|Customer it will give you 1 but it there is not Country selected, it will give you 0 due to you have used Alt (Expression, 0)


For further understanding, kindly refer to QlikView Reference Manual and check WildMatch, Alt and GetFieldSelection functions...

View solution in original post

2 Replies
crusader_
Partner - Specialist
Partner - Specialist

Hi,

If selected '%Dimensions' contains '*Country*' then '%Dimensions'

else 0

Hope this helps.

Andrei

MK_QSL
MVP
MVP

Consider that you have below in your script...

Dimensions:

Load * Inline

[

  %Dimensions

  Customer

  Country

  Sales

  Purchase

];

Now considering that you have a list box %Dimension

Let me break this expression so better to understand.......


GetFieldSelections(%Dimensions, '|')

The above expression will give you List of All selected values from List box %Dimension

Consider that you have selected Country and Customers, it will give you result as below

Country|Customer

WildMatch(GetFieldSelections(%Dimensions, '|'),'*Country*')

WIldMatch will check that from the selected values of %Dimension, is there any values named Country or not?

For above example, where we have result Country|Customer it will give you 1 but it there is not Country selected, it will give you 0 due to you have used Alt (Expression, 0)


For further understanding, kindly refer to QlikView Reference Manual and check WildMatch, Alt and GetFieldSelection functions...