Forum Discussion
Concatenate Dates based on ID
- 5 years ago
Hi Anonymous ,
First go to query editor>create an index column;
Then create a column as below:
contatenated date = var _minindex=CALCULATE(MIN('Table'[Index]),FILTER('Table','Table'[ID]=EARLIER('Table'[ID]))) Return IF('Table'[Index]<>_minindex,CONCATENATEX(FILTER('Table','Table'[ID]=EARLIER('Table'[ID])&&'Table'[Index]<=EARLIER('Table'[Index])),'Table'[Date],","))And you will see:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
- Anonymous5 years ago
Thank you Kelly for your time
Anonymous , Try a new column like
calculate(concatenatex(distinct(Table[Date]), [Date]), filter(Table, [ID] =earlier([ID])))
Thank you Amit for you suggestion.
Column = CALCULATE(CONCATENATEX(DISTINCT(Sheet2[Date]),Sheet2[Date]),FILTER(Sheet2,[ID]=EARLIER([ID])))
But the expression didn't help me to get desired output. I need to mimic column "Concatenated Date".
a. if "Date" appears for first time against ID,concatenation should not be done
b. if we have different "Date" against same ID then concatenated two dates (First & Second) and sould be shown in row of second occurence
Thank you in advance
Suren
- v-kelly-msft5 years ago
Community Support
Hi Anonymous ,
First go to query editor>create an index column;
Then create a column as below:
contatenated date = var _minindex=CALCULATE(MIN('Table'[Index]),FILTER('Table','Table'[ID]=EARLIER('Table'[ID]))) Return IF('Table'[Index]<>_minindex,CONCATENATEX(FILTER('Table','Table'[ID]=EARLIER('Table'[ID])&&'Table'[Index]<=EARLIER('Table'[Index])),'Table'[Date],","))And you will see:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!