cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
thelastredwolf
Regular Visitor

Working with several csv and just keep duplicates

Hello,

 

I already get content of 1 file, but is it possible to make a flow about the three last files of a folder? I can choose a static file, but i don t know if a flow can choose dynamically.

 

Everyday i have a new csv file, and i have to compare with two last days csv, and extract duplicates between the three files.

 

If possible, i appreciate to automate it 😉

3 REPLIES 3
900cut
Frequent Visitor

Hi @thelastredwolf . I can imagine how it works. 

Get files, to get the list of files and then filter to have just 3.

Then make array from each of them.

And then there should be 

intersection(variables('Array1'),variables('Array2'))

And then the same between the new array and the third. https://debajmecrm.com/how-to-compare-two-array-objects-union-and-intersection-of-arrays-in-power-au...

Can you paste an example of CSV here if you need more support 

 

Hello 900cut, thanks a lot for your message.

It is not really by get files, but when a new file is added in a specific folder. (end users just put the raw csv into this folder)

How do you filter by 3 most recent files?

I have got a poblem when i split my array.

 

csv exemple:

"NAME","TEAM","SCORE"
"SORTINA","IT","1"
"ADETE","FR","1"

But after slip it becomes:

[
  "NAME,TEAM,SCORE\r",
  "SORTINA,IT,1\r",
  "ADETE,FR,1\r",
]

What s wrong? 😕

900cut
Frequent Visitor

Hello @thelastredwolf . Could you please put @ and then the name you want to ask? I accidentally found out you asked me something.

There is a way to parse CSV. I learnt it here https://www.c-sharpcorner.com/article/parse-csv-file-using-power-automate/

And it worked fine in my case. Can you please try?
If you need further support on this, please let me know. And if you get some screenshots it would be easier to support.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,097)