web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
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:
  • Verified answer
    mdevaney Profile Picture
    29,993 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 396 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 323

#3
WarrenBelz Profile Picture

WarrenBelz 193 Most Valuable Professional

Last 30 days Overall leaderboard