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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Sum function will not ...
Power Apps
Answered

Sum function will not return result when column name contains ''

(0) ShareShare
ReportReport
Posted on by 50

Hi there,

 

I am having trouble getting my sum calculations to appear in a label and im starting to get annoyed 🙂 
I have established connection to a SQL-database which contains data from NAV and the connection works just fine.

 

One of the screens of my app contains three labels: "Total quantity", "quantity invoiced" and "quantity to ship" as shown below.  Dont mind the datatable in the screen.

Anmærkning 2019-10-24 112407.png

These labels should contain the total sum of a column found i my SQL-database. For the "Total Quantity" there is no problem at all when i use the below code. Except that it will not show "psc".

Sum(
 Filter(
 '[dbo].[CRONUS TRIMIT W1 Ltd_$Sales Line]';
 'Document No_' = LblAppName6.Text
 );
 Quantity
) & " psc"

However, when i use the exact same code for "quantity to ship" and "quantity to invoice" i can see powerapps reacting shortly but the sum does not appear. There is no error-message and the database columns are not empty.

Sum(
 Filter('[dbo].[CRONUS TRIMIT W1 Ltd_$Sales Line]';
 'Document No_'=LblAppName6.Text
 );
 'Quantity Invoiced'
)

Seems to me that when the expression in Sum() contains more than one word, something goes wrong?

 

thx

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @JMGCORNATOR 

     

    What is the datatype for 'Quantity Invoiced' column?
     
    Can you try to update your expressions as:
     
    For Quantity:
    Concatenate(Sum(
        Filter(
            '[dbo].[CRONUS TRIMIT W1 Ltd_$Sales Line]';
            'Document No_' = LblAppName6.Text
        );
        Quantity
    );" psc")
     
    For Quantity Invoiced:
    Sum(
        Filter('[dbo].[CRONUS TRIMIT W1 Ltd_$Sales Line]';
                'Document No_'=LblAppName6.Text
        );
        Value('Quantity Invoiced')
    )
     
    Hope this helps!

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • JMGCORNATOR Profile Picture
    50 on at

    @yashag2255 

     

    The concatenate() does not change much for me, however, I managed to get past the problems with Quantity.

     

    For the Quantity Invoiced, everything works fine now 🙂 I kind of messed up - The column does contains  values, but they are all zero, so i thought a value of zero would appear when summing.

     

    Anyways, Thank you!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard