Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
byrnel0586
Creator
Creator

Concatenating Multiple Values of a Field

Hi,

I am wanting to concatenate multiple 'MRP D/C Dates' into one cell in order to only have 1 row per member in my pivot table. In my example there are only 2 dates, but there can be more than that. I have tried creating variables and combining those but that gives me errors in my calculated dimension. For instance, in the below example I would like to see '11/28/2016, 3/29/3016' in one row rather than it creating 2.

Any help is appreciated!

1 Solution

Accepted Solutions
sunny_talwar

My bad, replace and with a comma

Aggr(Concat(DISTINCT {<MeasureID = {'MRP'}, Gap = {'>0'}>} EVENT_DATE, ','), MEM_ID)

View solution in original post

14 Replies
vhespinog
Contributor III
Contributor III

Hello

Maybe

load

Concat(MRP D/C Dates,' ') as MRP D/C Dates

Resident Table;

maxgro
MVP
MVP

did you try with the concat function?

concat(yourdatefield, ',')

vishsaggi
Champion III
Champion III

= Concat('MRP D/C Dates', ',')

byrnel0586
Creator
Creator
Author

I have tried that and am getting "// Error in calculated dimension."

byrnel0586
Creator
Creator
Author

I have tried that and am getting "// Error in calculated dimension."

vishsaggi
Champion III
Champion III

Can you paste your calculated dim expression here you are using?

byrnel0586
Creator
Creator
Author

Sure. Here is a screenshot actually.

vishsaggi
Champion III
Champion III

Can you try like:

= Aggr(Concat(DISTINCT EVENT_DATE, ','), EVENT_DATE)

byrnel0586
Creator
Creator
Author

Thank you. I think I am getting there. I tried Aggr(Concat(DISTINCT EVENT_DATE, ','), MEM_IDand that concatenated all of the event dates as it should. However, I am only needing to concatenate event dates where MeasureID = 'MRP' and Gap >0. I tried =if(match(MeasureID, 'MRP_MRP') and Gap > 0, Aggr(Concat(DISTINCT EVENT_DATE, ','), MEM_ID)) and it did not work. Your help is appreciated!