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

IsBlank() problem with cell value

Hello everyone,

 

I have a canvas app connected to an Excel file with this formula in a TextInput as its Default value:

If(IsBlank(Last(Filter(Table,Column1 = condition).Column2)),Blank(),Last(Filter(Table,Column1 = condition).Column2))

 

So if the cell referred by the formula is empty, a blank value is supposed to be returned. But instead, a 0 appears. I made sure there was nothing contained in the cell pointed but it keeps showing me a 0 instead of the blank value I need. 

 

I have tried using this formula instead:

If(Last(Filter(Table,Column1 = condition).Column2)=0,Blank(),Last(Filter(Table,Column1 = condition).Column2))

 

But the problem with this formula is that if there´s an actual 0 contained in the cell, the app will display a blank vlaue.

 

Please help me!

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Anonymous ,

Yes, that would be the outcome and probably a reason to read this article.

You might consider acquainting yourself with a SharePoint backend.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

8 REPLIES 8
nmilligan5400
Frequent Visitor

This could be an Excel issue because of the way that Excel evaluates blank cells. See this article from Microsoft: https://docs.microsoft.com/en-us/office/troubleshoot/excel/use-formula-evaluate-blank-cell. Try editing your spreadsheet so that the cells aren't simply blank. Then edit your PowerApps statement to reflect your change in Excel.

WarrenBelz
Super User
Super User

Hi @Anonymous ,

Try this

With(
   {
      vCondition,
      Last(
         Filter(
            Table,
            Column1 = condition
         ).Column2
      )
   },
   If(
      IsBlank(vCondition) || vCondition=0
      Blank(),
      vCondition
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Anonymous
Not applicable

Hi @WarrenBelz ,

 

Thanks for your reply!

 

I´m afraid this won´t work in my case. I need a 0 value returned when there´s an actual 0 in the cell. The code you described returns Blank in any of both cases. Please tell me if I´m mistaken.

 

I also tried leaving only the IsBlank(vCondition) statement but it wasn´t useful.

nmilligan5400
Frequent Visitor

Hi, I think if you work the problem in Excel, you'll have a better outcome in PowerApps.

 

In Excel if you make a column that evaluates your cells for blank qualities like this:

 

=IF(ISBLANK(A1),"Blank",A1)

 

I think you will get the results you want downstream in PowerApps.

Hi @Anonymous ,

Yes, that would be the outcome and probably a reason to read this article.

You might consider acquainting yourself with a SharePoint backend.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Hi @Anonymous ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Anonymous
Not applicable

Hi @WarrenBelz ,

 

Thanks for the useful tip. From now on I will use Sharepoint lists for all of my new proyects. 

 

So just to be clear, there is now way my problem can be solved with Excel as back end? It would take me a lot of work to move my actual data source entirely to Sharepoint!

HI @Anonymous ,

I am not an Excel user, but I do a bit of work on this forum and have seen numerous issues with Excel that simply do not happen with SharePoint. There is no code to solve things that should work an do not and even if you solved this one, I am fairly confident you will be back with another roadblock before too long if you want any scalability with Excel - it is a spreadsheet, not a database.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,226)