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 / Bar chart Data Source ...
Power Apps
Answered

Bar chart Data Source - Grouping by Date

(0) ShareShare
ReportReport
Posted on by 28

Hey guys, 

 

I was wondering if someone could help me with the final peace of the puzzle for a Bar Chart data source. 

 

Im using the below formula to pull through the chart items, which is correctly pulling in the journey and steps for the app user. However ideally I'd like to group the number of steps per day, so that there are no duplicate journey dates. 

 

I've attached the an image of the the below formula's results. 

 

Thank you in advance 😄  

 

Sort(
Filter(
ShowColumns(
WellbeingStepsChallenge_StepsLog,
"JourneyDate",
"Steps",
"UserEmail"
),
User().Email in UserEmail
),
JourneyDate,
Descending
)

 

tapper_0-1595793906196.png

 

 

Categories:
I have the same question (0)
  • Verified answer
    mdevaney Profile Picture
    29,989 Moderator on at

    @tapper 

    You'll want to begin my adding this code to the OnStart property of your app to store the User's email in a variable.

    Set(varUserEmail, User().Email)


    Then put this code in the Items property of your Chart

    DropColumns(
     AddColumns(
     GroupBy(
     Filter(Wellbeing_StepsChallenge_StepsLog, UserEmail=varUserEmail),
     "JourneyDate",
     "GroupedDates"
     ),
     "Sum of Steps",Sum(GroupedDates, Steps)
     ),
     "GroupedDates"
    )


    You can learn how to GROUP BY and SUM tables of data here.  I adapted this method to your problem.

    https://matthewdevaney.com/powerapps-collections-cookbook/group-by-and-find-the-sum/

     

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

  • tapper Profile Picture
    28 on at

    Hi @mdevaney  

     

    Thank you so much for your help with this.... It worked perfectly you genius!

     

    Thanks again 

     

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard