cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

Usage of formula in Gallery rows in Power App

Hi,

In power App, i have used Gallery which displayed data from the table.

Column Name is : Name and Price.

 

NamePrice
A100
B+20
B115
B25

 

I need  sum (B1 and B2)  displayed to B+ as shown above.

 

Thanks

Amit

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Hi @amsrivas ,

Actually I do not quite understand your demand....

Could you show me your original data in excel?

I need to know what the original table looks like and what the result table looks like.

I assume that in excel, your table looks like this: (table1)

Name Price
A1 100
B1 15
B2 5

You want to display table like this in powerapps: (table2)

Name Price
A+ 100
B+ 20

//sum for As and Bs

If so, you could transfer table1 to table2 like this:

RenameColumns(
              ShowColumns(
                          AddColumns(
                                  GroupBy(
                                      AddColumns(exceltable,"Name1",Left(Name,1)&"+"),
//add a column with value: A+,B+
                                          "Name1",
                                          "prices"
                                           ),
//group based on A+,B+
                                   "sum",
                                   Sum(prices,Price)
                                     ),
//add a column with sum of As,Bs
                          "Name1","sum"),
              "Name1","Name",
               "sum","Price"
             )

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Highlighted
Helper II
Helper II

Hi!

 

Can you give me a little more info?


Is the table local in powerapps or is it coming from a sharepoint list? Im going to work on a solution right now that I think will fix it

Highlighted

Hi,

In power App, i have used Gallery which displayed data from the table.

Column Name is : Name and Price.

 

NamePrice
A100
B+20
B115
B25

 

I need  sum (B1 and B2)  displayed to B+ as shown above.

 

Source is excel file on One Drive

 

Thanks

Amit

Highlighted

Hi @amsrivas ,

Actually I do not quite understand your demand....

Could you show me your original data in excel?

I need to know what the original table looks like and what the result table looks like.

I assume that in excel, your table looks like this: (table1)

Name Price
A1 100
B1 15
B2 5

You want to display table like this in powerapps: (table2)

Name Price
A+ 100
B+ 20

//sum for As and Bs

If so, you could transfer table1 to table2 like this:

RenameColumns(
              ShowColumns(
                          AddColumns(
                                  GroupBy(
                                      AddColumns(exceltable,"Name1",Left(Name,1)&"+"),
//add a column with value: A+,B+
                                          "Name1",
                                          "prices"
                                           ),
//group based on A+,B+
                                   "sum",
                                   Sum(prices,Price)
                                     ),
//add a column with sum of As,Bs
                          "Name1","sum"),
              "Name1","Name",
               "sum","Price"
             )

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

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