Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
124psu
Creator II
Creator II

constrain dimension by set analysis

Hi all,

I am trying to limit my dimension based on 2 conditions but am having a hard time setting up my set analysis.

I have a list of account names that end in either PA, VA, CA, etc. Each account name also has its corresponding region which is West, East, South, North.

I want to constrain my dimension to display only those account name ending with VA and also where the region is NOT equal to North.


If(WildMatch([AccountName], '*VA*', [AccountName]), [region] <> {'North'})

 

Labels (2)
2 Replies
Ezir
Creator II
Creator II

Hi @124psu 

Try

if(Right([AccountName], 2)='VA' and [region]<>'North', DIMENSION)

 

 

Vegar
MVP
MVP

I believe that @Ezir solution will help you, but neither that or your attempt should be considered as SET analysis.

SET analysis is used to manipulate which data set are to be considered in an aggregating expressions such as sum, avg, min, max etc; very powerful when creating measures, but not as good for dimensions.

 

A comment on your expression
If(WildMatch(

  [AccountName],

  '*VA*',

  [AccountName]) // you will always get a match when comparing the account name with it self

, // in SET comma is the correct delimiter, but here you should use AND

[region] <> {'North'} // the correct syntax is [region] <> 'North'

)

So this adjusted version should work correctly

If(WildMatch([AccountName], '*VA*') AND [region] <> 'North' ,[AccountName], Null() )