cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Want to show Group by fields in Power app

Hi All,

I have created a database in SharePoint like below

Volumetric NameVolumeItem Code No.Nominal Volume PortTolerance
Volumetric flask10W 195 244M1221
Volumetric flask10W 195 244M3443
Volumetric flask10W 195 244M5659

 

I want to show group by item based Volumetric Name, Volume & Item Code No. in the power app gallery.

because Volumetric Name, Volume, Item Code all 3 fields are common.

how to show in Power App.

 

Thanks in advance.

 

 

 

18 REPLIES 18
Highlighted

Hi @bhalchandra ,

Based on the formula that you mentioned, I think there is something wrong within it. I agree with @mdevaney 's thought almost.

 

Please consider modify your formula as below:

GroupBy(
       AddColumns(
                  [@CalibrationDB],   // do not miss comma operator here
                  "Volumetric Item name Value", // specify a different column to your Choice field
                  'Volumetric Item name'.Value    // SP List Column contains space should be wrapped with single quote rather than double quotes
       ),
       "Volumetric Item name Value", 
       "Volume", 
       "Item Code no"
)

Please take a try with above formula, check if the issue is solved on your side.

 

Best regards,

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

I have out common and single quotes as per your code but still it shows error

PFA

Highlighted

GroupBy(
       AddColumns(
                  [@CalibrationDB],   // do not miss comma operator here
                  "Volumetric Item name Value", // specify a different column to your Choice field
                  'Volumetric Item name'.Value    // SP List Column contains space should be wrapped with single quote rather than double quotes
       ),
       "Volumetric Item name Value",
       "Volume",
       "Item Code no"
)

I have corrected above code , but still it is not working.

Highlighted

@bhalchandra 

The column named "Volume" is underlined in double-red.

My untested theory is that maybe you cannot group by a number data type.  You could try changing the Volume column to type "Single Line Text" and then Refresh the datasource in PowerApps using the left-side menu.  If this works my theory is correct.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted

Hi @bhalchandra ,

Could you please share a bit more about the "Volume" column? Is it a Number type column in your SP list?

 

The GroupBy function could use "Number" type column as group column, so I think this issue is not related to Data Type @mdevaney .

 

Based on the formula that you mentioned, I think there is something wrong with it. You have specified these columns by which to group records within your GroupBy function, but you do not specify the GroupColumnName argument. The standard formula format as below:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-groupby#syntax

1.JPG

So you need to modify your formula as below:

GroupBy(
       AddColumns(
                  [@CalibrationDB],   
                  "Volumetric Item name Value", 
                  'Volumetric Item name'.Value
       ),
       "Volumetric Item name Value",
       "Volume",
       "Item Code no",
       "GroupData"   // specify the value for "GroupColumnName" attribute
)

Note: After you specify the value for the "GroupColumnName" attribute, the rest of columns (except these columns specified in your GroupBy function) from your SP List would be saved into the "GroupData" column.

 

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

 

Best regards,

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

This is my dashboard , I tried both the code but still it not working 

please find attachment 

Highlighted

Hi @bhalchandra ,

Have you typed the following GroupBy function within the Items property of the Gallery?

 

GroupBy(
       AddColumns(
                  [@CalibrationDB],   
                  "Volumetric Item name Value", 
                  'Volumetric Item name'.Value
       ),
       "Volumetric Item name Value",
       "Volume",
       "Item Code no",
       "GroupData"   // specify the value for "GroupColumnName" attribute
)

Based on the needs that you mentioned, I think the above formula could achieve your needs. Within your Gallery, you could reference the "Volumetric Item name", "Volume", "Item Code no" column value using the following formula:

ThisItem.'Volumetric Item name Value'
ThisItem.Volume
ThisItem.'Item Code no'

 

Could you please share a screenshot about the formula you typed within the Items property of your Gallery?

 

Best regards,

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

PFA 

Highlighted

PFA, Code as I have written in gallery .

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 (9,870)