Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Text Property of label using groupby & sum is visible in formula bar but not the label text

Posted on by 9
Not so much a question as an observation.  I have a canvas app, using a dataverse table holding expense lines. 

I wanted to display a label above a gallery that contained a summary of the gallery data but without applying the search criteria used to filter the gallery itself (the totals would always be correct regardless of what was being searched for).

It's something I have done many times before but never had this problem with:

Staring code
Match(
Concat(GroupBy(Filter(Expenses, EXStatus=DDExpenseStatus.Selected.Value),
extechname, GRPData),
extechname & ": " & If(1>2, First(GRPData).EXTotalPaid & " ") & Text(Sum(GRPData, EXTotalPaid), "#,###,##0.00") & ", ")
, "^(?<trim>.*), $" ).trim
 
The text displayed the correct strings from extechname column, separated by commas but no values at all. Showing the command in the formula bar it resolved correctly with the values summed as expected
 
Changed to this to check that the data was present
Match(
Concat(GroupBy(Filter(Expenses, EXStatus=DDExpenseStatus.Selected.Value),
extechname, GRPData),
extechname & ": " & First(GRPData).EXTotalPaid & ", ")
, "^(?<trim>.*), $" ).trim
The text displayed the correct strings from extechname column with the EXPTotalPaid value from the first row in GRPData, separated by commas.
 
Solution
Match(
Concat(GroupBy(Filter(Expenses, EXStatus=DDExpenseStatus.Selected.Value),
extechname, GRPData),
extechname & ": " & If(1>2, First(GRPData).EXTotalPaid & " ") & Text(Sum(GRPData, EXTotalPaid), "#,###,##0.00") & ", ")
, "^(?<trim>.*), $" ).trim
 
 
This now displays the sum correctly, simply by referring to the EXPTotalPaid in a way that it will never be displayed  . . . If(1>2, etc.
 
Seems a bit weird to me but I can only imagine that the column is not being displayed if it is not explicitly referenced and because the groupby only exists within the label a reference to it anywhere else does not count.
 
Anyway, I thought it might be useful to anyone else experiencing a similar problem.
 
I will leave the post open for now, in case anyone has a better solution.
  • Verified answer
    KD-24070946-0 Profile Picture
    KD-24070946-0 9 on at
    Text Property of label using groupby & sum is visible in formula bar but not the label text
    .

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,297

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,890

Leaderboard