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 / Leaderboard with Diffe...
Power Apps
Answered

Leaderboard with Difference

(1) ShareShare
ReportReport
Posted on by 80

Hi all,

 

I am trying to create a fitness app with leaderboard which displays name and amount of weight lost in KG.

 

Data is recorded in one SharePoint list. So, we have current weight of all those registered. When we again add their new weight (which will be done 4 times throughout the challenge) it should calculate difference of initial weight and the latest weight recorded.

 

My current table has below columns: 

-name

-email

-weight in KG

-Created Date and Time (SharePoint generated column) 

 

NameEmail weight in KGCreated Date and Time
AbcAbc@abc.com45

12/1/2023 3:45 PM

XyzXyz@xyz.com5011/1/2023 1:20 PM
AbcAbc@abc.com435/2/2023 4:00 PM

 

Leaderboard should show Abc on top with 2 KGs lost followed by others. As initial weight of Abc was 45 kg and then in Feb it was 43 Kg.

 

Can you pls advise. Thanks! 

@WarrenBelz 

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @PowerDigitize_1 ,

    You will need to add your actual field names here

    Sort(
     AddColumns(
     GroupBy(
     Sort(
     SPListName,
     Created,
     Descending
     ),
     "Name",
     "Data"
     ),
     "Email",
     First(Data).Email,
     "Weight",
     First(Data).Weight,
     "DateTime",
     First(Data).Created,
     "Lost",
     Index(
     Data,
     2
     ).Weight - First(Data).Weight
     ),
     Lost,
     Descending
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • PowerDigitize_1 Profile Picture
    80 on at

    Thanks @WarrenBelz, it worked!!! Your solutions are always helpful in one go!!

    Highly appreciate it! 😀

  • PowerDigitize_1 Profile Picture
    80 on at

    @WarrenBelz - Just one more question...how can I assign row numbers as well? For ranking?

  • CU11091259-0 Profile Picture
    6 on at
    I had a similar challenge when I was trying to set up a leaderboard for a fitness app. What worked for me was creating a column to track the weight difference between the starting weight and the most recent one.

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