Hi @PowerBI87
There is a couple of ways you can do this. One of which is, initialize an array variable at the top of the flow and then add action to get items. create an apply to each loop to iterate over the items returned and then in the loop add a condition to check if the array contains the company name. If it does do nothing else, add append to array variable action and select the company name.
Outside the loop, add another apply to each loop and this time iterate over the array and add the action filter array where you can provide the list returned from sharepoint to check if the company name is current item from the array. This way you get filtered distinct companies.
Now, you can add another variable and from the filtered array, append the year values.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!