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
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
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,
Kelly
Did I answer your question? Mark my post as a solution!