Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

concat expression

Hi,

In a table chart I'm trying to do a simple expression using a value from the same row but different column, something like this:

Table:

  • Sales Rep
  • Expression =sum({<SalesRep_IslandTable={'"'&concat(DISTINCT [Sales_Rep])&'"'}>}Stores_Count)

                    or

                         =sum({<Level1_PC={$(='"'&concat(DISTINCT [Reps Level1])&'"')}>}MonthID_HMRRegionID_PharmacyCount_PC)

the formula

='"'&concat(DISTINCT [Reps Level1])&'"'

works fine in a different column, but when I introduce it the formula I want, it doesn't work...

What am I doing wrong?

Thanks in advance,

Francisco.

1 Solution

Accepted Solutions
Not applicable
Author

I understood I could not do it like that, because of the logical calculation of the table chart...

I worked around this problem with triggers to the island table and a different set analysis...

Thanks anyhow,

Francisco

View solution in original post

4 Replies
Gysbert_Wassenaar

Set analysis on other fields of the same record often doesn't work like you expect. See this example for an explanation: set_analysis_intra-record.qvw


talk is cheap, supply exceeds demand
DavidFoster1
Specialist
Specialist

This would be better titled as a SET ANALYSIS query more than a concatenate.

Try:

=sum({<SalesRep_IslandTable=P({$}[Sales_Rep])>}Stores_Count)


This should restrict the store_count to only those related to the currently possible values of Sales Rep

Not applicable
Author

I understood I could not do it like that, because of the logical calculation of the table chart...

I worked around this problem with triggers to the island table and a different set analysis...

Thanks anyhow,

Francisco

Not applicable
Author

Thanks David but I needed 1 to 1 the Sales Reps (model table <-> island table).

I found a way to solve my problem...

Thanks and regards,

Francisco.