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: 
JustinDallas
Specialist III
Specialist III

Show all values in CONCAT measure even after selecting a single one

Hello Folks,

I have a script with a measure made from the CONCAT keyword

Concat([Team Type], ', ', -Weight)

 

With the following dummy script 

Cities:
Load 
City as '%_city',
* Inline 
[
	City
    Philadelphia
    New York
    Pittsburgh
]
;

TeamType:
Load 
City as '%_city',
[Team Type],
Weight
Inline
[
	City, Team Type, Weight
    Philadelphia, Baseball, 23
    New York, Baseball, 45
    Pittsburgh, Baseball, 19
    Philadelphia, Basketball, 8
    New York, Basketball, 71
]
;

Exit Script
;

 

When I select Basketball I get the following:

JustinDallas_2-1667401569647.png

 

What I want to see is even though Basketball is selected, all the other Team Types are still brought in.  Below is what I am trying to get to.

City Concat([Team Type], ', ', -Weight) Team Types List
New York Basketball, Baseball
Philadelphia Baseball, Basketball

 

You see that even though the selection is Basketball, Baseball is still brought in.  I've tried Concat({1}...) but that didn't work and ignored ALL selections.

 

Any help is greatly appreciated

Labels (4)
1 Solution

Accepted Solutions
MarcoWedel

maybe like this?

Concat({$<City=p(),[Team Type]>} [Team Type], ', ', -Weight)

 

MarcoWedel_0-1667411228421.png

 

View solution in original post

6 Replies
Dalton_Ruer
Support
Support

You can use 1 of 2 flavors of Set Analyis. 

The first ignores ALL your filters:  Concat({1} [Team Type], ', ', -Weight)

The second will ignore only the filter on team type but honor any others: Concat({<[Team Type]=>} [Team Type], ', ', -Weight)

Check out this post I created about Set Analysis and download the PDF in the post: https://community.qlik.com/t5/Qlik-Sense-Documents/Making-Sense-of-Section-Access-in-Qlik-Sense/ta-p...

JustinDallas
Specialist III
Specialist III
Author

Hello @Dalton_Ruer ,

I've tried those two Set Analysis queries.  They didn't work because when you select Basketball, the query ignores the selection and continues to bring in Pittsburgh that only has a Baseball team.

agigliotti
Partner - Champion
Partner - Champion

Hi @JustinDallas ,

Maybe this:

aggr( {1} concat( {1} [Team Type], ', ', -Weight ), City )

I hope it can helps.

Best Regards

MarcoWedel

maybe like this?

Concat({$<City=p(),[Team Type]>} [Team Type], ', ', -Weight)

 

MarcoWedel_0-1667411228421.png

 

JustinDallas
Specialist III
Specialist III
Author

Hello @MarcoWedel ,

It works like a charm.  I understand that the City=P() means "look at all possible cities".  But what does the "Team Type" in the following term do?

 

Concat({$<City=p(),[Team Type]>} 
MarcoWedel

Glad it worked.

[Team Type]

in this case is like 

[Team Type]=

meaning selections in field [Team Type] should be ignored (equal sign is not strictly necessary).

hope this helps

Marco