cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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

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
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

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

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
News & Announcements

Community Blog

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

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (5,833)