web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Zero values not displa...
Power Apps
Answered

Zero values not displaying in Data Tables / Forms / Controls

(0) ShareShare
ReportReport
Posted on by 34

Hi, 

 

Not sure if anyone has come across this, I have done extensive searching and haven't found anything similar.

I have a Whole Number field in CDS and the when the information is displayed in the PowerApp, if the Whole Number field has a Zero '0' it is displayed as blank.

 

I can set the value in the PowerApp, the zero is pushed to CDS but when displayed directly from the CDS datasource it is displayed as empty, which is obviously very confusing for the user.

 

Obviously I could create a "display field" in which I can display a zero in my local collection but this is an unnecessary hack when this appears to be a bug in the system.   Zero is a number, not a null.

 

Anyone have any thoughts around this.

 

Thanks

Categories:
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @PierreJoubert ,

    Could you please share a bit more about your scenario?

    Do you mean that the Zero value (0) within the Whole field in your CDS Entity displayed as blank within your app rather than 0?

     

    Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:11.JPG

    Please consider take a try to re-generate a new app based on your CDS Entity, then check if the issue is solved.

     

    Also please consider remove the Whole number field from your CDS Entity, then add a new one, then edit your CDS Entity data in Excel (click "Edit data in Excel" option), populate Zero value (0) within the new added Whole Number field, and publish the modification. After that, generate an app based on your CDS Entity, check if the issue has been fixed.

     

    If the issue still exists, as an alternative solution, you could consider take a try with the following workaround:

    Within your Gallery, set the Text property of the Label to following:

    If(
     IsBlank(ThisItem.WholeNumberColumn),
     0,
     ThisItem.WholeNumberColumn
    )

    Within your Edit form, set the Default property of the Whole Number field Text Input box to following:

    If(
     IsBlank(ThisItem.WholeNumberColumn),
     0,
     ThisItem.WholeNumberColumn
    )

    Please take a try with above solution, check if the issue is solved.

     

    Best regards,

  • Pierre Andre Joubert Profile Picture
    34 on at

    Hi, This is in a Data Table, not a gallery, and it is a column, not label:


    App:
    Capture.PNG

     

    Same data in CDS:

    Capture2.PNG

    It is not the fault of CDS.

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @PierreJoubert ,

    I have also made a test on my side, and don't have the issue that you mentioned. The screenshot as below:12.JPG

     

    Please consider re-create a new app based on your CDS Entity data source, then check if the issue is solved.

     

    Also please consider take a try to remove the Whole Number field from your CDS Entity, and re-create a new one, then re-create a new app based on your modified CDS Entity, check if the issue has been fixed.

     

    On your side, you could consider save your CDS Entity records into a Collection using the following formula:

    ClearCollect(RecordsCollection, YourCDSEntity)

    then check if the Zero value (0) within the Actual Quantity field displayed as its original value (0) witin above RecordsCollection. If the Actual Quantity field displayed as Blank witin above RecordsCollection, I think there is something wrong when you retrieve data from your CDS Entity into your app.

     

    In addition, as an alternative solution, please also take a try with the following workaround:

    Set the Items property of your Data Table to following:

    AddColumns(
     YourCDSEntity,
     "QTY",
     If(IsBlank('Actual Quantity'), 0, 'Actual Quantity')
    )

    then within your Data Table, enable the "QTY" field to display the Whole Number field value.

     

    Best regards,

  • Verified answer
    Pierre Andre Joubert Profile Picture
    34 on at

    Firstly this is a live system, I cannot just delete a field that is in active use.

    I am already using local collections as I am using the offline capability extensively.

    Whether local or directly from CDS, the column does not display zero values.

    Creating a new app is also not a workaround.  I have tested this and it is still occurring.

     

    I have created a display field, but this is not a solution.

     

    Nevermind, hacks and workarounds it will have to be.

  • andy_yee Profile Picture
    10 on at


    I have been running into this same issue recently. I view my collection and see a 0 value in the column (where I calculated with Sum() function across rows in the data source table). But when I display this collection column in a label, all values except the zeros appear.

     

    The workaround solution I found was to use #1 syntax instead of #2.

    #1.
    RoundDown(Value(ThisItem.CO2e_MT),0)
    This works for zeros.


    #2.
    Text(ThisItem.CO2e_MT,"[$-en-US]#,###")
    This does not work for zeros.


    Hope this helps.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I had the same issue recently when attempting to create a data table within a powerapp. The solution I had found was to select the field in the table that is showing up blank, the formula bar should read ThisItem,'selectedfield', change to If(IsBlank(ThisItem.'selectedfield'), 0, ThisItem.'selectedvalue')

     

    In my case the selectedvalue was photo count.

    Example2.pngExample.png

    I hope this helps.

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.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard