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

Adding Columns

Hi Guys,

 

I'm struggling to include additional data source fields with the below 'Items' code applied to a canvas app. This code groups all entries by email address and calculates the individuals 'total steps'. This works perfectly for the calculation. However, the only accessible fields are the 'userEmail' and 'Steps'. I'd really like to include the other fields in the data source. 

 

tapper_0-1595343301272.png

As you can see from the below image, I can only see the two fields. 

tapper_1-1595343353118.png

 

I would like to include (at the least) the 'UserDisplayName' in a text label also.

 

tapper_2-1595343453522.png

 

Thanks in advance for your help 🙂 

Steve

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Adding Columns

Hi @tapper :

I suggest you add 

 

"UserDisplayName",

 

where I marked

1.JPG


Sort(
    AddColumns(
          GroupBy(
               WellbingStepsChallenge_StepsLog,
               "UserEmail","UserDisplayName",
               "Steps"
               ),
               "TotalSteps",
              Sum(
                 Steps,
                 Steps
              )
           ),
           TotalSteps,
           Descending
)

 

The records will be grouped according to the two fields "UserEmail" and "UserDisplayName".

Best Regards,

Bof

 

View solution in original post

3 REPLIES 3
Highlighted
Super User
Super User

Re: Adding Columns

Since every email has same display name you can add another column in the formula like:

.... Sum(Steps, Steps),"DisplayNamess",UserDisplayName)

 

Am assuming UserDisplayName is a column in your table.

 

If you have issues Post this formula in Text format instead of image

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Highlighted
Super User
Super User

Re: Adding Columns

Since every email has same display name you can add another column in the formula like:

.... Sum(Steps, Steps),"DisplayNamess",UserDisplayName)


Am assuming UserDisplayName is a column in your table.

 

If you have issues Post this formula in Text format instead of image

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Highlighted
Community Support
Community Support

Re: Adding Columns

Hi @tapper :

I suggest you add 

 

"UserDisplayName",

 

where I marked

1.JPG


Sort(
    AddColumns(
          GroupBy(
               WellbingStepsChallenge_StepsLog,
               "UserEmail","UserDisplayName",
               "Steps"
               ),
               "TotalSteps",
              Sum(
                 Steps,
                 Steps
              )
           ),
           TotalSteps,
           Descending
)

 

The records will be grouped according to the two fields "UserEmail" and "UserDisplayName".

Best Regards,

Bof

 

View solution in original post

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,848)