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 / How to calculate GPA i...
Power Apps
Answered

How to calculate GPA in PowerApps

(0) ShareShare
ReportReport
Posted on by 18

I have a collection of Data with the following columns, 1. Batch , 2. Rating, 3. Date.

Steps that need to be followed to calculate the GPA

  1.  Calculate the Average rating of a month for a Batch. Example- If the data is a follows
    BatchRatingDate
    Java61/01/2023 12:00:00 AM
    Java71/15/2023 12:00:00 AM
    Java61/31/2023 12:00:00 AM
    Java82/31/2023 12:00:00 AM
    Python61/15/2023 12:00:00 AM
    Python71/31/2023 12:00:00 AM
    Python8 2/31/2023 12:00:00 AM
    Then the average rating for the batch Java for the 1st month will be (6+7+6) = 6.33 . 
  2. Calculate the average rating for a Batch. Lets take the same example given above then the average rating for a Batch Java will be (6.33+ 8)/2 = 7.16 and for Python it will be ((6+7)/2+8)/2 = 7.25 which is Sum of monthly average ratings for a batch / number of months the rating is given for a batch. 
  3. Now the GPA for this data will be the overall average i.e. Sum of ratings for a batch / total number of batches. For the above example the GPA will be (7.16+7.25)/2 = 7.205 which is average rating for Java + average rating for Python / 2 (Total number of batches).

How can i do the above calculation in PowerApps.

Categories:
I have the same question (0)
  • Ash8 Profile Picture
    18 on at

    I have put together a formula but i am not getting the desired output in the collection D145 -  

    ClearCollect(
    D145,
    ForAll(
    Distinct(TestList, Batch),
    {
    Batch: Value,
    Result: Average(
    ForAll(
    Distinct(
    Filter(
    TestList,
    Batch = Value,
    Month(Date) = Month(ThisRecord.Date)
    ),
    Month(Date) & Year(Date)
    ),
    {
    Date: Value,
    MonthAvg: (Sum(
    Filter(
    TestList,
    Month(Date) & Year(Date) = Value,
    Batch = ThisRecord.Batch
    ),
    Rating
    ) / CountRows(
    Filter(
    TestList,
    Month(Date) & Year(Date) = Value,
    Batch = ThisRecord.Batch
    )
    ))
    }
    ),
    MonthAvg
    )
    }
    )
    );

    Set(
    GPA,
    Average(
    D145,
    Result
    )
    );

  • Verified answer
    Ash8 Profile Picture
    18 on at

    This worked for me - 

    ClearCollect(
    Demo123,
    ForAll(
    Distinct(
    TestList,
    Batch
    ),
    {
    Batch: Value,
    Result: Average(
    ForAll(
    Distinct(
    Filter(
    TestList,
    Batch = Value,
    Month(Date) = Month(ThisRecord.Date)
    ),
    Batch & "," & Month(Date) & Year(Date)
    ),
    {
    Date: ThisRecord.Value,
    MonthAvg: (Sum(
    Filter(
    TestList,
    Month(Date) & Year(Date) = Last(Split(Value,",")).Value,
    Batch = First(Split(Value,",")).Value
    ),
    Rating
    ) / CountRows(
    Filter(
    TestList,
    Month(Date) & Year(Date) = Last(Split(Value,",")).Value,
    Batch = First(Split(Value,",")).Value
    )
    ))
    }
    ),
    MonthAvg
    )
    }
    )
    );

    Set(GPA, Round(Average(Demo123,Result),2));

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 490

#2
WarrenBelz Profile Picture

WarrenBelz 427 Most Valuable Professional

#3
Vish WR Profile Picture

Vish WR 381

Last 30 days Overall leaderboard