Forum Discussion
Date string list - ascending order
- 1 year ago
Hi JK-1 ,
You should be able to use the ORDER BY optional parameter in the concatenatex function. This should work:CONCATENATEX(FILTER(Site, Site[Site No] = EARLIER(Site[Site No])), [Effective Date], ";", [Effective Date], ASC)
Notice the second "Effective Date" field. We're using it to tell the expression to sort by the effective date in ascending order. - 1 year ago
Hi JK-1 ,
You should be able to use the ORDER BY optional parameter in the concatenatex function. This should work:
CONCATENATEX(FILTER(Site, Site[Site No] = EARLIER(Site[Site No])), [Effective Date], ";", [Effective Date], ASC)
Notice the second "Effective Date" field. We're using it to tell the expression to sort by the effective date in ascending order.
Would there be a way to expand the expression so in the sorted date string it returns dates up to a certain point in time, either TODAY() - or using another column containing alternative end date(s)?
🤞
- hnguy711 year ago
Super User
Hi JK-1
Yes, you would add it within your FILTER criteria:
CONCATENATEX( FILTER('Site', 'Site'[Site No] = EARLIER('Site'[Site No]) && // Using the double && or || to denote that there are additional conditions to be met [Effective Date] >= DATE(2025, 1, 1) // && means 'and' while || means 'or' // continue with your filter criteria until it meets your requirements. Sample. ), [Effective Date], "; ", [Effective Date], ASC )- JK-11 year ago
Helper II
Thanks for this. It returns the dates as just TRUE, TRUE, FALSE
Etc.
rather than just the date format previously. Was hoping there might be a way to only display the trues but with their dates intact - and for the false ones to drop out.
sorry for the overly complicated ask
- hnguy711 year ago
Super User