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 / Calculated/Formula col...
Power Apps
Answered

Calculated/Formula column help

(0) ShareShare
ReportReport
Posted on by

Hello,

 

I'm working on Seating data from our existing SQL Server database that I want to implement in Dataverse.  The basic structure has a record for a Seat and the seat is related by Lookup to a table of Rooms and is given an integer identifier to indicate which seat in the room is indicated.  Each seat can also have a contact assigned.  The result is a Seating table that looks like this, more or less:

 

Seating

---------

Seat (primary column name, contains value like "RoomName - SeatNumber"

Room (lookup to Room table - required)

SeatNumber (ID for seat which starting left from the room entrance is numbered clockwise 0 to N, where N is the total number of seats in the room - a room may have no seats if it's a lab for example)

Contact (lookup to Contact table - optional)

 

Overall this is pretty much where I want it.  I had to adapt the way I handled seats and seat ids on the SQL Server side to create a functionally similar feature in Dataverse but I think it'll work.  What I'd like to accomplish to make the lives of my users easier is to figure a way to automatically populate the Seat ID.  Starting out with the initial data import from SQL Server I'll have all the information I need, but moving forward I'd like the functionality of adding or removing seats to have features that will appropriately adjust the data as needed.  Specifically, I'd like the SeatNumber to be calculated as the MAX(SeatNumber) for the current Room plus 1.  Pretty simple idea.  I'm not sure how that could be implemented in Dataverse though.  It's easy enough to articulate - get me the max value of the seat number for the group of records for the current room.  

 

If I could get any insight or advice on how to approach this I'd appreciate it.

 

Thanks,
Dave Spaar

I have the same question (0)
  • Verified answer
    ivan_apps Profile Picture
    2,189 Moderator on at

    I don’t believe you’ll be able to do what you want directly on a formula column definition. You can’t reference other rows or summary data within a formula column, just that row’s data.

     

    Are you using a canvas app for data input? What you could do is apply your logic for calculating the seat id once someone presses a button to create a new seat. Your on select/new record logic would be able to do a First(Sort(Filter())) to determine the top most seat number for the selected room, then add 1. 

  • dms117 Profile Picture
    on at

    Thanks for the suggestion, I'm looking at a canvas app solution now.  I think I can make the formula work for a new record to set the desired value. I'll accept this as the solution.

     

    Regards,

    Dave

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard