Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Specialist III
Specialist III

ListBox Set Expression

I have a situation.

I have table like below. This is only sample. I have multiple entries.

  

SectorHeader
NAM
ASPACX
EMEA
LATAMX
ASPAC
EMEAX
NAMX

I have a ListBox with expression : =If(Match(Sector,'ASPAC','EMEA','NAM','MEXICO-S','DIGITAL'),Sector & '--' & Header)

This results me something like below:

 

ASPAC--X
ASPAC--
EMEA--X
EMEA--
NAM--X
NAM--
MEXICO-S--X

DIGITAL--X

The Header field has X's and NULL's.

I want to display only Header with X's.

I have tried below expression, but could not achieve any.

=If(Match(Sector,'ASPAC','EMEA','NAM','MEXICO-S','DIGITAL'),Sector & '--' & FirstSorterValue(Header,-Ord(Header)))

=If(Match(Sector,'ASPAC','EMEA','NAM','MEXICO-S','DIGITAL'),Sector & '--' & MaxString({<Header={'X'}>}Header))

Any advise please..

1 Solution

Accepted Solutions
Highlighted

Try this:

=Aggr(Only({1<Header = {'X'}>} Sector & '--' & Header), Sector)


Capture.PNG

View solution in original post

9 Replies
Highlighted

Try this:

=Aggr(Only({1<Header = {'X'}>} Sector & '--' & Header), Sector)


Capture.PNG

View solution in original post

Highlighted
Specialist III
Specialist III

Amazing.. Sunny, The Rajini

Thank you so much.

It worked..

Highlighted
Specialist III
Specialist III

Hi Sunny,

I just changed a bit on this to list all the Values. It looks like, it returns only the Selected.

=Aggr(Only({1<Header = {'X'}>} Sector & '--' & Header), Sector)

Highlighted

What did you change?

Highlighted
Specialist III
Specialist III

Hi Sunny,

Added 1 to  the Expression instead of $.

Highlighted

Hahahaha okay... I did update that in my response when I attached the sample

Highlighted
Specialist III
Specialist III

I'm sorry. It was there in your code. As I have typed it, I could have missed that one.

Sorry again... I over looked it..

Highlighted
Specialist III
Specialist III

Oh ok sure..

Highlighted

No sorries my friend. I did add it at a later point. So totally not your mistake