Skip to main content
Announcements
Announcing Qlik Talend® Cloud and Qlik Answers™ to accelerate AI adoption! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

getting all data from the list where only one name is selected

Hi

I'm trying to create an expression where I use two lists (I use more, but I think these two lists will do it):

Department:

New York

Boston

Chicago

And in each department got 4 sellers, named like this:

NY1, NY2,...... C4

If one has selected seller C2, I would like to pull the rest of those sellers from Chicago to be shown in a block-chart.

How can i do that?

Kind rgs

Espen

4 Replies
swuehl
MVP
MVP

So it's like you want to make an implicite selection in Department based on your selection in Seller, showing all Seller for that Department? Then look into set analysis and the p() function, something along this line:

=Sum( {<Department  = p(), Seller= >} VALUE)

eduardo_sommer
Partner - Specialist
Partner - Specialist

I created a Straight table with Department as the dimension and the following as the expression:

     =Concat({$<Seller=E(Seller)>} Seller, '/')

     This is expression concatenates all Sellers not selected (in one list) from the Department selected (in the other list)

I hope this solves your problem

Eduardo

Not applicable
Author

Hi

Thank you for the answer. I cannot get it to work,

maybe it is because it's in a string:

=If(IsNull(GetCurrentSelections()), Department,

If(GetSelectedCount(Department)=1,Seller,

If(GetSelectedCount(Department)>1,Department,

If(GetSelectedCount(Seller)=1,{<Department = p(), Seller=>},

If(GetSelectedCount(Seller)>1,Seller,Department)))))

Kind rgs

Espen

Not applicable
Author

Hi Eduardo

I tried your suggestion too, but i couldn't get it right. My idea is to be able to show all sellers from the group where one seller has been selected, mainly for comparisement

I use this in a block-chart.

=If(IsNull(GetCurrentSelections()), Department,

If(GetSelectedCount(Department)=1,Seller,

If(GetSelectedCount(Department)>1,Department,

If(GetSelectedCount(Seller)=1,Concat({$<Seller=E(Seller)>} Seller, '/'),

If(GetSelectedCount(Seller)>1,Seller,Department)))))

Kind rgs

Espen