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 / Nested functions synta...
Power Apps
Unanswered

Nested functions syntax help

(0) ShareShare
ReportReport
Posted on by

Hi everyone.  Need help with nested functions.  When I pull in a gallery using the following formula:

Sort(GroupBy(DepotPlacedOrders,"Part","DATA"),Part,Ascending)

 

I get exactly what I need.  I am trying to turn it into a collection and add date pickers.  When I use this formula

ClearCollect(colRollup,Filter(Sort(GroupBy(DepotPlacedOrders,"Part","Created","DATA"),Part,Ascending),(Created>=dpStartRollup.SelectedDate Or IsBlank(dpStartRollup.SelectedDate)) And (Created<=DateAdd(dpStopRollup.SelectedDate,1,Days) Or IsBlank(dpStopRollup.SelectedDate))))

 

Its ALMOST perfect, it just does not group by the column "Part" .  Everything else appears to work correctly.  The date picker works properly.

 

Any help would be appreciated!  

 

Chris

Categories:
I have the same question (0)
  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Anonymous 

    Please try the following,

    ClearCollect(
     colRollup,
     GroupBy(
    		Sort(
    			Filter(
    				DepotPlacedOrders,
    				(
    				 Created >= dpStartRollup.SelectedDate 
    				 Or IsBlank(dpStartRollup.SelectedDate)
    				) 
    				And (
    				 Created <= DateAdd(
    					dpStopRollup.SelectedDate, 1, Days
    				 ) 
    				 Or IsBlank(dpStopRollup.SelectedDate)
    				)
    			),
    			Part, Ascending
    		), 
    		"Part", "Created", 
     "DATA"
     ) 
    )
  • Community Power Platform Member Profile Picture
    on at

    @CNT Thank you for the quick reply.  I am seeing the same thing on the gallery with this code.  Its repeating items in the parts column still.  

     

    ckserra_0-1638371078773.png

    Ultimately Im trying to get the number of items sold for each item in the parts column.

    Chris

  • Verified answer
    CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Anonymous 

    Please try the following. Items Sold will have the count you need.

     

    ClearCollect(
     colRollup,
    	AddColumns(
    		GroupBy(
    			Sort(
    				Filter(
    					DepotPlacedOrders,
    					(
    					 Created >= dpStartRollup.SelectedDate 
    					 Or IsBlank(dpStartRollup.SelectedDate)
    					) 
    					And (
    					 Created <= DateAdd(
    						dpStopRollup.SelectedDate, 1, Days
    					 ) 
    					 Or IsBlank(dpStopRollup.SelectedDate)
    					)
    				),
    				Part, Ascending
    			), 
    			"Part", "DATA"
    		),
    		"Items Sold", CountRows(DATA)
    	)
    )
  • Community Power Platform Member Profile Picture
    on at

    @CNT That works perfect, thank you very much for your help!!

     

    Chris

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Anonymous 

    Glad to help!

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard