Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to restrict data displayed on a table depending on the value of a field

Hello,

I am trying and failing to restrict the data displayed on a QlikSense table depending on the value of a given field.

Below is my little very simplified instance that is failing and I don't know why (Actually I am a newbie using QlikSense).

So to make it simple I have one table with one column that is displaying one field on my data table named "EBPR_PHA_DESC".

Debugg1.JPG

I would like to use the complements section (add-ons in english interface) located bottom left to restrict the display to lines where EBPR_PHA_DESC is equal to LCM. To do so I am using the following expression : "If('EBPR_PHA_DESC'='LCM',True(),False())"

And it does not show the line with the value LCM.

Debugg2.JPG

But If I am using this simple expression that is obviously true the data are back again "If('LCM'='LCM',True(),False())".

Debugg3.JPG

So I am wondering what I am doing wrong ? May be a stupid newbie thing.

Any help & advices are very welcome.

Thanks,

Fred

1 Solution

Accepted Solutions
ogster1974
Partner - Master II
Partner - Master II

Try this way.

Make your dimension a calculated one.

If(EBPR_PHA_DESC='LCM',Null(),EBPR_PHA_DESC)

Then in your table dimension section un tick show null values.  Your LCM records should be removed.

View solution in original post

6 Replies
ogster1974
Partner - Master II
Partner - Master II

Try this way.

Make your dimension a calculated one.

If(EBPR_PHA_DESC='LCM',Null(),EBPR_PHA_DESC)

Then in your table dimension section un tick show null values.  Your LCM records should be removed.

Not applicable
Author

Thanks for your suggestion that I am sure is working. But in my case I am not looking for a workaround solution.

Indeed I would like to understand why what I tried to do in my kind of "hello world instance" didn"t work.

Because at the end of the day I would like to display records on a tables with 3-4 columns based on the value of a field that will not be displayed on the table.

Since I don't think that what I want to do can be performed without a workaround I will consider your answer as the correct one. Cheers. Fred

brunobertels
Master
Master

Hi Fred

En fait Bonjour car je vois que tu utilises Qliksense en français.

Voici pourquoi cela ne marche pas :

Dans ta première image , tu as ajouté ta dimension : "EBPR_PHA_DESC". et ton tableau te renvois la liste des valeurs de ta dimension.

et la formule dans manipulation de données pour limiter ta dimension à une valeur

"If('EBPR_PHA_DESC'='LCM',True(),False())"

traduite : si ma dimension = ma valeur alors Vrai sinon Faux

Et ceci ne marche pas car ta dimension n'est pas égale à une de ses valeurs

puis tu as mis cette formule

"If('LCM'='LCM',True(),False())".

Qui dit Si A = A alors vrai sinon faux

la formule étant vrai , ta dimension n'est pas restreinte à la valeur choisi

( Si tu mets A = B , tu n'auras aucune valeur d'afficher dans ta liste.

Cette formule

If(EBPR_PHA_DESC='LCM',Null(),EBPR_PHA_DESC)

est une dimension calculée qui dit :

Si( dans la dimension il y a la valeur 'LCM' , affiche null ,sinon affiche ma dimension.

En fait je pense plutot qu'il faut mettre pour n'afficher que LCM ceci

If(EBPR_PHA_DESC='LCM',EBPR_PHA_DESC,Null())

qui peut se traduire par :

Si( dans la dimension il y a la valeur LCM , alors affiche ma dimension qu'avec cette valeur, sinon n'affiche rien)

En espérant que cela t'éclaire.

Bruno

Not applicable
Author

Hi Bruno,

Merci beaucoup pour ta suggestion mais lorsque j'essaye ta formule elle "ne marche pas" (voir le screen shot ci-dessous) lorsque je passe par la section complements.

-------------------------------------------

Thanks a lot for your suggestion. But actually it does not work (screen-shot below) when I use the formula in the add-ons section.

Debugg4.JPG

En fait elle marche si je l'utilise la section données (screen-shot qui suit) mais je voudrais vraiment utiliser la section compléments car à long terme je veux afficher les données de la table en fonction de valeurs de champs qui ne sont pas affichées dans la table de QlikSense mais qui sont contenu en backend. Vois tu une solution pour réussier à faire cela. ?

--------------------------------------------

Actually the formula works when I sue it in the data section (screen-shot below) but I would like to use it in the add-ons section. Indeed in a long term perspective I would like to display data in my table depending on the values of othe fields that are not displayed on the table but that are stored in backend table that have been loaded in QlikSense.

Do you have any idea on how to perform that ?

Debugg5.JPG

Thanks,

Fred

Not applicable
Author

Hi Frederic,

Would it be possible to add a measure into your table ?

With a measure we can add a "set analysis" in order to restrict the scope of calculation on a data model's field(s).

In your exemple we can use this kind of measure :

Count({<EBPR_PHA_DESC={'LCM'}>}My_Measure_Field)

Florent.

Not applicable
Author

Hi Florent,

Thanks for your suggestion.

Actually I didn't want to add any measure but of course your reponse makes sense.

Fred