cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Hockeyman9474
Helper III
Helper III

Learning How to Code and a build an App from scratch

I am in desperate need of learning Coding and building a simple app from a blank template. I am experienced in some languages but I can't seem to get code to work within power apps. I find the information provied on the power apps site to be very basic and not very helpful. Can anyone suggest where I can look to find training.

16 REPLIES 16

I am surprised the reset to default did not work.  You may find that there is a difference between 1 and "1".

Try a different default value to see if it works.  You can just put the same code ona button to make it easier.

View solution in original post

ok so far so good. I added the buttons instead of "Dirtying" the Datsource. I just need one more recommendation. The last screen displays the results. The Datasource is a table where the item appears several times because each record is a different month. I need to sum per item per location, per item per District, per item per Region. I added a gallery and attempted to aggregate all 3 in the gallery, but that doesn't work because the gallery item is = to the location. So now I am thinking 3 galleries in all. but I am having trouble with the sum formula. Also, collecions could be helpful, but I don't understand them one lick. Here is what I have.

 

Collecion 1:

Filter(Table4,Mid(Retailer,18,50)=RET)  The actual retailer name starts at character 18, and 50 so I am sure to capture the entire name; RET is a variable passed in from previous screen

Collection 2:

Filter(Table4,Mid(Retailer,9,1)=DIST)  The district number is located at this point of reatiler and DIST is a variable

Collection 3:

Filter(Table4,Left(Retailer,3)="020")

 

Am hiking on the right trail here?

View solution in original post

Hi @Hockeyman9474

 

I think this is a good opportunity to use the Sum() and the GroupBy() functions.

 

How you do this in your particular case depends on the number of rows since Sum and GroupBy are not yet delegable, so you are limited to summing over 500 rows.  If your data source has more than 500 rows you just need to filter down to 500 rows or less before you do the sum.

 

For example, something like this if you want a single number answer.

Sum(Filter(MyTable, My filter criteria), MyNumberColumnToBeSummed) 

If you want a table of sums grouped by certain criteria then you can go for GroupBy.

 

Having said all of this, it seems that your Retailer column is a code that includes many attributes, and maybe you could use calculated columns in your data source to split those so that the filtering etc. will be more efficient, particualrly since Mid is probably not a delegable function (although I could be wrong).

I actually knew that, but I went with 3 separate galleries. Seemed like I had more control. I pretty much have it right but numbers are off by small amounts. I think it must have something to do with that 500 line limitation. I am going to make an attempt at understanding collections. I think they may be helpful to me.

 

Quick question, I turned off aspect ration and screnn rotation, but the screen still doesn't rotate. Any ideas?

On screen rotation, no idea.  I only ever use this on the desktop...

Fighting with collections all day. I am not sure I know how they work. I have a screen with a drop down for selection of a district and some code that handles that. Once selected, the following screen filters for Retailers in that district. once a retailer is slected I go to a final screen that display's some sales information. I noticed the information is inaccurate but not by a lot, so I thought this was a result of the 500 line limitation. So then I remembered someone, possibly you, suggesting filtering from a collection may be a work around. Problem is I am not understanding collections fully. I need to create a collection based on a variable from the previous screen, but I need to colelct every column of sales information for that Retailer.

 

Also, is there a way to communicate with you through this forum other than through a thread?

View solution in original post

EvanChaki
Advocate IV
Advocate IV

Confluent (beconfluent.com) offers PowerApps and Flow training.
Confluent

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,778)