cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PseudoNew
New Member

Filtering Excel Data in Flow

Hello, 

 

I am trying to create a flow that will notify me 2 weeks before a specific date as a reminder to complete a task.

 

High Level Process: 

 

Read rows from an excel file > Filter excel rows that are 2 weeks away > send email reminder

 

Here's what my current flow looks like that doesn't seem to work. 

Flow.PNG

I could be going about this all wrong and I'm fine if someone has a better solution. 

1 ACCEPTED SOLUTION

Accepted Solutions

 

Hi @PseudoNew ,

 

From your screenshot, the value displayed by StartDate is Number instead of the expected date. You need to refer to the following thread to restore number to Date.

https://powerusers.microsoft.com/t5/Building-Flows/Excel-file-to-list-flow-date-issue/m-p/279258#M28...

 

For reference, you can use the following expression to the left of Condition:

addDays('1899-12-30',int(item()['StartDate']),'yyyy-MM-dd')

19.PNG

 

When configuring Append to an array variable, if you want to add StartDate with Date format, you need to use the same expression.

 

Please take a try again.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Brad_Groux
Community Champion
Community Champion

Check out this solution by @v-yuazh-msft - How to filter data from Excel rows.

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!

v-bacao-msft
Community Support
Community Support

 

Hi @PseudoNew ,

 

  1. The first thing you need to determine is whether the Body of the Filter Query is empty. If it is empty, check if the expression you are using is valid.
  2. Second, check that the value of StartDate in the Body of List rows present in a table action is in the expected date format.
  3. Third, if you have used the Filter array to filter records, then Apply to each should be the Body output by the Filter array as the source of the traversal.
  4. Fourth, when configuring Select, you need to use an expression such as item ()[’ColumnName’] to get the field value.

Please follow the tips above to try to improve your Flow.

 

In addition, you could refer to the following methods to configure Flow without using Filter array and Select. Assume that the value of the StartDate field is displayed in the expected date format on the Body.

  • Configure variables to store filtered records, and use Condition to filter records directly.
  • Then append the eligible records to the variable in the specified format, you can add the fields you want to display in the table.

Image reference:

17.PNG

Details in Apply to each:

18.PNG

Hoep this helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you for the help. 

 

I'm still getting hung up on the date formatting. The date comes in as 'MM-dd-yyyy'.

Would I need to convert the date first before filtering? 

 

Flow2.PNG

 

Hi @PseudoNew ,

 

From your screenshot, the value displayed by StartDate is Number instead of the expected date. You need to refer to the following thread to restore number to Date.

https://powerusers.microsoft.com/t5/Building-Flows/Excel-file-to-list-flow-date-issue/m-p/279258#M28...

 

For reference, you can use the following expression to the left of Condition:

addDays('1899-12-30',int(item()['StartDate']),'yyyy-MM-dd')

19.PNG

 

When configuring Append to an array variable, if you want to add StartDate with Date format, you need to use the same expression.

 

Please take a try again.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,071)