Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Restrict dimension value display

Hi everybody,

today i have a new problem with qlikview,

Problem :  i want to show the dimensions of my straight table only if that respect a condition

Exemple : my complete table

table.PNG

And what i want :

table2.PNG

My solution was to write in the dimension 'Nom': if (BD= 'ML', 'KL', 'BL', [Nom]) , but this doesnt work , i also tried to replace "," by "+" and "or"

if (BD= 'ML'or 'KL',or 'BL', [Nom]) i get nothing with that.

If somebedy got a solution i'll appreciate that, Thanks you

14 Replies
PrashantSangle

Hi,

try

if (wildmatch(BD, 'ML', 'KL', 'BL'), [Nom])

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
stigchel
Partner - Master
Partner - Master

The correct syntax is

if(BD='ML' or BD='KL' or BD='BL', [Nom])

MayilVahanan

Hi

Try like this

=if (match(BD, 'ML', 'KL', 'BL'), [Nom])

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
jonathandienst
Partner - Champion III
Partner - Champion III

Rather keep the expression as a simple Nom, and filter the expression(s), something like

Sum({<BD = {'ML', 'KL', 'BL'}>} Sales)

I would reserve calculated dimensions only for those cases where the dimension has to be calculated on the fly as they can be performance killers.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Thanks Max Dreamer  your syntax work perfectly, but as mentionned below Jonathan that kill performance because i havn't just 3 conditions like my example 'ML', 'KL', 'BL' but 15.

I'll try other option, but thx u very much

PrashantSangle

Hi,

Yes calculated dimension always performance killer,

So you can write same thing in Script and create new field and use that field as you dimension.

Which is much better option.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

Hi Jonathan can you explan more please,

like u said i doesent want to kill the performance but i'm new in qlik and your solution seems really good, can you explin me step by step please??

thanks you

Not applicable
Author

How i can do that?

I have to wrine in my load Script?

PrashantSangle

Yes

Where is your Nom Field

in next line write

that if (wildmatch(BD, 'ML', 'KL', 'BL'), [Nom]) as New_Nom

and use New_Nom as your dimension in chart.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂