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: 
cloud
Contributor III
Contributor III

Concat 2 distinct values of a dimension with formatting

Hi all, 

I want to do this on a pivot table 

Count = 1,2

Score = A, B

Concat score and Count to become like this:

A-1, B-2

on a cell in pivot table. 

Currently my set expression is 

Concat(DISTINCT Score & Count, ',') 

 

Appreciate any help. please don't send qlikview files and type in the example instead. thanks. 

Labels (3)
5 Replies
Masi_Sahargahi
Contributor III
Contributor III

You can consider an "id" field for any row which you want to concat:
like :
Count:
load * inline
[
id,f1
1,1
2,2
];

Score:
load * inline
[
id,f2
1,A
2,B
];
cloud
Contributor III
Contributor III
Author

Hi Masi,
it should be dynamic. I can only use set expression to do the concat.
vsr_shimla
Contributor II
Contributor II

Hi,

If you  only want to concat values you can try this:

LOAD Distinct Score&'-'&Count as NewFeild,* INLINE [
Count, Score
1, A
2, B
];

Or write this  as an expression Score&'-'&Count  in your Pivot Table  loading Score and Count dimensions

Regards

 

cloud
Contributor III
Contributor III
Author

I've tried Score&'-'&Count but it shows me this result:
-, A-1, B-2
there's extra hyfen and comma before the score. how do I remove this
vsr_shimla
Contributor II
Contributor II

Post more data that you are trying to load