Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jyothish8807
Master II
Master II

Conditional Show Dimensions

Hello,

could you please give me any advice about my problem? Maybe you already met this.

I have dimensions in listbox which are similar. That mean that some of them contains same words.

Customer

Customer Phone

Customer Country

When "Customer phone" is selected, in table "Customer" will appear as well. Is there any chance to use these similar names in list box with dimensions? Now is this conditional expression in use:

=SubStringCount(Concat(Fields, '|'), 'Customer')

Thank you!

Best Regards,
KC
1 Solution

Accepted Solutions
nagaiank
Specialist III
Specialist III

Try using the expression

SubStringCount(Concat('~'&Fields&'~', '|'), '~Customer~')

View solution in original post

6 Replies
avinashelite

Hi Jyothish,

Do you want to build a dimension out of  it??

try using WILDMATCH and math the similar words and give a proper dimension name I think that will do you requirement i guess.

jyothish8807
Master II
Master II
Author

Tried with WILDMATCH but it didnt work. I am enabling and disabling the dimensions dynamically.

So now when i select Customer Phone, Customer is also getting enabled.

Regards

KC

Best Regards,
KC
b_garside
Partner - Specialist
Partner - Specialist

Its picking up Customer in each dim field since they all have that in common. You will need to explicitly spell out each one like the example below.  Hope this helps. The other thing you can try is assign an Index Id column for each Dim and use that instead.

=SubStringCount(Concat(Fields, '|'), 'Customer')

=SubStringCount(Concat(Fields, '|'), 'Customer Phone')

=SubStringCount(Concat(Fields, '|'), 'Customer Country')

jyothish8807
Master II
Master II
Author

Hi Brian,

I have already done this. Still it is picking Customer.

Regards

KC

Best Regards,
KC
nagaiank
Specialist III
Specialist III

Try using the expression

SubStringCount(Concat('~'&Fields&'~', '|'), '~Customer~')

jyothish8807
Master II
Master II
Author

Awesome, this worked. Nice trick

Regards

KC

Best Regards,
KC