Hi @MichelH,
By using a Distinct function, do you want to return a one-column table that contains the results, with duplicate values removed?
Currently, there is no direct Distinct function can be used in Microsoft Flow. I have achieved this by using variables in flow. Please take the following flow for a reference.
The flow is triggered by a Button.
Get rows from a SQL table.
Initialize variable, set name as TestName, Type as Array.
Add an Apply to each, select Value from Get rows action, within the apply to each, add an action Append to array, set name as TestName, set Value with the following code:
item()?['name']
Under the Apply to each, add action Compose, input the following code to return the items with duplicate items removed:
union(variables('TestName'),variables('TestName'))
Images for your reference:


Best regards,
Mabel Mao