Qlik Community

Groupe des Utilisateurs Francophones

cancel
Showing results for 
Search instead for 
Did you mean: 
jmialoundama
Creator III
Creator III

Set analysis : Filter dimension

Bonjour,

Je souhaiterai avoir tous les 'Lib.Rayon(ref)' quand ma colonne 'Cd.Univers(ref)' = 83 avec un set analysis.

Je penses utiliser la fonction "IF" dans mon expression, cependant je bloque un peu

Capture.JPG

Merci d'avance

1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

Hi,

You can't SUM() a text field!

if you only want to see [Lib. Rayon (ref)] where [Cd.Univers(ref)]=83 use the ONLY() function in a ListBox with AGGR or below sum Function in a Table


in a ListBox

AGGR( ONLY ( {$<[Cd.Univers(ref)]={'83'}>} [Lib. Rayon (ref)] ) , [Lib. Rayon (ref)]  )


OR in a table with


Dimension = [Lib. Rayon (ref)]

Measure = Sum({$<[Cd.Univers(ref)]={'83'}>}1)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

14 Replies
Anil_Babu_Samineni

Looks set analysis syntax wrong? Try this? The first one strike through and add parenthesis in the end

=Sum({$<[Cd. Univers (ref)]={'83'}>} [Lib. Rayon (ref)])

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
jmialoundama
Creator III
Creator III
Author

Hello Anil,

Thanks you for your feedback,

I try you syntax but i have this error:"Dimension is not valid"

Capture.JPG

Anil_Babu_Samineni

It's clearly stating the issue, What dimension you used for. Can you hit Fx and check the validation ??

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
jmialoundama
Creator III
Creator III
Author

That is the syntax i use in "fx" :

Capture.JPG

But , I think i need to use "if" expression for resolv my problem


if [Cd. Univers (ref)]={'83'} then i want to see the  [Lib. Rayon (ref)].


But i don't know how to transform that in QS becuase i'm begginer.

Anil_Babu_Samineni

In UI the set analysis tool is same for QIX engine to both. To your question. Can you try that expression as measure / Sum(1) and Dimension as [Lin. Rayon (ref)]

Update - There is a text in image from that field. Hence, it won't happen. Can you help us your intend to show

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
brunobertels
Specialist III
Specialist III

Bonjour

Sum, Avg, Min, Max, etc sont des agrégations qui requièrent l'utilisation de Aggr() pour être utilisées comme dimension

Donc essayes ceci

Aggr(

Sum({$<[Cd.Univers(ref)]={'83'}>} [Lib. Rayon (ref)])

,[Lib. Rayon (ref)]

)

jmialoundama
Creator III
Creator III
Author

Bonjour Bruno,

J'ai utilisé votre syntax sauf que je ne vois pas les libélés rayons qui sont égaux à 83, à la place je vois que des zéros.

Capture.JPG

Au lieu de voir ceci :

Capture.JPG

vinieme12
Champion III
Champion III

Hi,

You can't SUM() a text field!

if you only want to see [Lib. Rayon (ref)] where [Cd.Univers(ref)]=83 use the ONLY() function in a ListBox with AGGR or below sum Function in a Table


in a ListBox

AGGR( ONLY ( {$<[Cd.Univers(ref)]={'83'}>} [Lib. Rayon (ref)] ) , [Lib. Rayon (ref)]  )


OR in a table with


Dimension = [Lib. Rayon (ref)]

Measure = Sum({$<[Cd.Univers(ref)]={'83'}>}1)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
YoussefBelloum
Champion
Champion

My bad ! i didn't even look at the table above..