cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sliziky1
Frequent Visitor

Filter JSON - Get values which are non empty

When I read a row from Excel I get a response in JSON:

body: {
    "1": "",
    "2": "X",
    "3": "Y",
    "4": "",
    ...
}

One row represents one year - 365 days where each day may contain some one-letter info (X, Y, Z..) or "" - the problem is that now I have to access all 365 days which takes quite a long time.

I would need to access only those which != "", is there any possibility how to do it? Thanks

5 REPLIES 5
jinivthakkar
Super User
Super User

@sliziky1 which action are you using ?

sliziky1
Frequent Visitor

List Rows From Table, which returns an array of objects

jinivthakkar
Super User
Super User

@sliziky1 I don't think you can filter rows but I found a similar thread which has a solution too, check this out: https://powerusers.microsoft.com/t5/Building-Flows/Filter-Query-issue-list-rows-present-in-a-table/t...

 

And for the execution time there is no setting to increase the speed so nothing can be done for that as well.

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

sliziky1
Frequent Visitor

Well, the problem is that I actually have 365 columns, so filtering by one is not the right way - I do not want to filter rows, I need to filter these columns which are empty 🙂

jinivthakkar
Super User
Super User

@sliziky1  OMG ! 365 columns but if you want to filter by column then you can do it easily and in the filter query you can have OR query specifying each column but the query would be too big and I am not sure what is the limitation wrt to query 

 

OR you can also try Run script action in which you can run a script and filter the data and then pass it for further processing, I think this is the only thing you can try provided you can write an excel script. Check this documentation : https://docs.microsoft.com/en-us/office/dev/scripts/tutorials/excel-power-automate-manual

 

jinivthakkar_0-1619602509561.png

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

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.

Users online (2,719)