I am trying export a list of transactions into excel. The transaction has revision numbers and I intend to export only the latest revision of the transactions.
Example:
Hi @Daus Shah,
In a single aggregate, you won't be able to do it, but by adding a bit of logic and another aggregate, you can. I'm attaching an example.
Regards
Hi Daus,
if you using aggregate or Adv SQL. so you need to do that logic in filter condition of created by column so it will return you latest record according to your req.
thanks
CV
Hi daus shah,
To extract the latest data in the excel you have to add the filter condition on the source of your excel data as per your requirement. Please let us know if you need any help while adding filter condition.
Thanks
I would appreciate it if you could show me the conditions that I can apply in the filter.
Latest Revision of transaction in the sense do you have any particular time frame to be considered?Eg: last 10 days or 15 days or last 50 transaction that has been updated recently etc?BR,Vignesh Prakash.
Hi @Vignesh Prakash,
I would like to show only the record of the latest revision. For example, if Document A have Revision 0, 1, 2, and 3. I would like to export only Revision 3.
@Daus Shah you can adapt to your sql,
SELECT *
FROM {Data} d
INNER JOIN (
SELECT {Data}.[Project], {Data}.[Document], MAX({Data}.[Revision]) AS MaxRevisionNumber
FROM {Data}
GROUP BY {Data}.[Project], {Data}.[Document]
) AS LatestRevisions ON d.Project = LatestRevisions.Project AND d.Document = LatestRevisions.Document AND d.Revision = LatestRevisions.MaxRevisionNumber
Hi @Mario Abud,
Thank you for the suggestion, I will try it. Is it not possible to just use the aggregate without needing to use the sql?
Thanks.
Thank you so much @Mario Abud. This helps me to achieve what I wanted and make me understand how to use ListAppend as well :)