I am new to Power Automate. I have attached the sales register.I need to filter this data by invoice date to show only the last 15 months of sales. Then, i need to filter by customer name and ISBN. I get the customer name and ISBN from MS forms.I am having trouble applying the date condition. Could some one help me resolve this issue?
If an excel column has a space in the column name then you can't use it in the filter query and need to use Filter Array instead.
I adjusted your spreadsheet to make 4 of the items within the last 15 months and 4 older than 15 months.
Use a Compose action to set the greater than or equal to 15 months: formatDateTime(addDays(utcNow(),-455),'yyyy-MM-dd')
In the list rows present in a table action make sure you ISO8601 for the DateTime format.
Then add a Filter Array action, select value from the dynamic content box for the From field. Then in the condition part select Invoice Date is greater than or equal to the outputs of the earlier compose.
What I've just done is then to add another compose action to check how many items were returned: length(body('Filter_array'))
As it's only brought back the items within the last 15 months you can now go on and add the other actions you need.
Rob
Los Gallardos
1 people found this reply helpful.
Was this reply helpful?YesNo
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.