cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Testing a column in collection has data

Hello PowerApps,

 

This Code: IsEmpty(Filter(DataViewer, 'Column' = Blank() || 'Column' = "0")) is not working. It does not correclty tell me if there is something in the collection. It shows ture for all occasions.

 

Does anyone have a better solution to test if a column is blank or not or has any fixs.

 

 

Thanks,

AskingQuestions

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Testing a column in collection has data

@Anonymous 

Sorry, had that a little backwards...

In re-reading, you want to determine if the column is blank or is a 0 and thus you consider the colun to be empty.  If that assumption is correct then what you want is:

CountRows(
   Filter(DataViewer, !(IsBlank('Column') || 'Column' = "0"))
   )

Using that formula, if the count is 0, then the column is empty or "0", if it is 1 or more, then there is something besides a blank or a "0".

 

I hope that is clearer.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

Highlighted
Super User III
Super User III

Re: Testing a column in collection has data

@Anonymous 

Yes, as the formula reads - if NOT 'Column' is blank or is "0" then it will match the filter and thus count as a row.  If all are blank or "0" then the filter results will have no records and thus the countrows will be 0.

If any count other than 0 comes back, then some row had something other than a blank or a "0" - and thus had data.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

6 REPLIES 6
Highlighted
Super User III
Super User III

Re: Testing a column in collection has data

@Anonymous 

Consider changing your formula to the following:

CountRows(Filter(DataViewer, 'Column' = Blank() || 'Column' = "0"))=0

The above will be true if the columns are all blank or 0 and false if there is data in them.

 

I hope that is helpful for you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
Anonymous
Not applicable

Re: Testing a column in collection has data

@RandyHayes ,

 

The My powerapps never returns false for any columns that do have values.

Highlighted
Super User III
Super User III

Re: Testing a column in collection has data

@Anonymous 

Sorry, had that a little backwards...

In re-reading, you want to determine if the column is blank or is a 0 and thus you consider the colun to be empty.  If that assumption is correct then what you want is:

CountRows(
   Filter(DataViewer, !(IsBlank('Column') || 'Column' = "0"))
   )

Using that formula, if the count is 0, then the column is empty or "0", if it is 1 or more, then there is something besides a blank or a "0".

 

I hope that is clearer.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

Anonymous
Not applicable

Re: Testing a column in collection has data

Thanks @RandyHayes ,

 

The Formula seems to be working.

 

Just to be in the same page. This formula filters out the blanks and zeros in a column then counts the rows present in the column. if the result of the formula is zero then that means the column is empty. If the result is greater than zero then that mean there is something in that column.

 

 

Thanks,

AskingQuestions

 

Highlighted
Super User III
Super User III

Re: Testing a column in collection has data

@Anonymous 

Yes, as the formula reads - if NOT 'Column' is blank or is "0" then it will match the filter and thus count as a row.  If all are blank or "0" then the filter results will have no records and thus the countrows will be 0.

If any count other than 0 comes back, then some row had something other than a blank or a "0" - and thus had data.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Testing a column in collection has data

Thank You @RandyHayes for helping me out.

 

 

 

 

Once again Thanks,

AskingQuestions 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,372)