Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
zagzebski
Creator
Creator

Moving multiple dimension values to one expression

I need to convert the "Current" chart below to "What I want" chart. Basically rather than have a sales dimension with three (3) people I want to put the names of those three people into one expression. Any ideas?

   

Current:
CustomersSalespersonRegion ARegion BRegion C
SZ WindowsSteve15000
DK InstrumentsDerek02000
BD SidingBrian00300
What I want:
CustomersRegion ARegion BRegion CSalespersons
SZ Windows150200300Steve, Derek, Brian

Thanks,

Zag

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Using Customers as dimension and

=Concat(DISTINCT Salespersons,', ')

as expression?

But it seems like sales persons are not having same Customer, so I am not sure how you want to get these into one line

Maybe like

=Concat(TOTAL DISTINCT Salespersons,', ')

View solution in original post

5 Replies
swuehl
MVP
MVP

Using Customers as dimension and

=Concat(DISTINCT Salespersons,', ')

as expression?

But it seems like sales persons are not having same Customer, so I am not sure how you want to get these into one line

Maybe like

=Concat(TOTAL DISTINCT Salespersons,', ')

zagzebski
Creator
Creator
Author

Thanks. This worked. Really appreciate it.

Zag

zagzebski
Creator
Creator
Author

One quick follow up. Is there any way to change the concatenation so  if I filter on one of the salesperson's it will search for that person's name anywhere within the string.

For instance if the expression:

=Concat(DISTINCT Salespersons,', ')  = "Steve, Derek, Brian"  and I filter on Steve it will show, but if I filter on Lisa this line will not show because Lisa is not in the string.

Zag

swuehl
MVP
MVP

Maybe like attached, using an expression in the chart like

=If(Only(Cat),Concat({<SalesPerson>} DISTINCT SalesPerson, ','))

zagzebski
Creator
Creator
Author

Your example gives me exactly what I want but unfortunately I am getting a null ("-") value in my application.  I will see if I can find the difference.

Zag