Get Distinct Records using the union expression in Power Automate

If you want to find all the distinct records in your data-source like a SharePoint list, there is no “Distinct records” action or distinct expression that you can use in Power Automate (earlier called Microsoft Flow) .

There is a simple way to do it using the union expression . This expression returns all the common items in two arrays. So, if we you use the union expression for an array on itself , it will return basically all the items, but the items that are there multiple times will be returned only once. Voila! You just found out the lookalike of ‘Distinct’ function in Power Apps.

Here is a screenshot of a simple flow with an array [1,2,4,1] and the compose action with the union expression –

Here is the expression I used.


If you have any questions, please let me know in the comments.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s