Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

CDS - difference between lookup and 1:N relationship


The project I am working on has a few One To Many relationships.  I have successfully set up one 1:N relationship between two tables. When I view data of the parent table in CDS, I see the records of the child table. So the relationship is right.


But I do not see a column in the parent table that points to the child table. I need to create a calculated column on the parent table and the value of the calculated column will be determined by its child records. For this reason, I think I need to be able to access the child records of a given parent record. But the calculated/rollup interface does not show me that option. But I do get to see the lookup tables that the lookup columns of the parent table point to.


Could someone please tell me:

1) What is the difference between a lookup table and a relationship? When should I use one vs the other? The concepts seem different from the old relational database design concepts.

2) If setting up a 1:N relationship is the right thing to do, how do I populate a calculated column on the parent table based on the values of the child table?


Thank you for your help.










Super User
Super User



In Dataverse (formerly Common Data Service or CDS)  the way to get an aggregate value of a field across multiple child entity records associated with a parent entity, and get that aggregated result to show up on what you call a "calculated field" on the parent entity, would be to, instead of using a "calculated field", to use a Rollup Field on the parent entity.


More information:

Super User
Super User



@JohnYu500 wrote:

Could someone please tell me:

1) What is the difference between a lookup table and a relationship? When should I use one vs the other?



We are unfamiliar with the terminology of a "lookup table" in Dataverse.


If you meant a "lookup column" (ref) versus a "relationship", here is explanation:


The "relationship" you are referring to, the main kind which is 1:N , let's suppose that one Account record can have many Contact records. The subgrid would be on the Account record, and can list 0, 1, or more than 1 Contact records associated with it.


On the other side of the perspective, the same relationship exists as Many to One, or N:1 between Contacts and Accounts - which is the same relationship actually, just seen from the other end.


Only this time, any one distinct Contact  record optionally has a specific reference to exactly one Account record, usually visually represented through a lookup column (previously called a lookup field) on the Contact. Another distinct Contact record, also can have the reference in the lookup column pointing to that same specific Account record as well. This would cause there to be those two exact contact records to be shown in the subgrid on the Account record side, and on each of the two distinct Contact records, the lookup field set to be pointing to the same Account record. So many Contacts can have one Account or N:1 from Contact to Account.


The N side of the relationship usually has the lookup field on it, or what is called a lookup column. (note that field has recently been renamed to column, as part of the round of name changes related to CDS rename to Dataverse)


@JohnYu500 wrote:

The concepts seem different from the old relational database design concepts.


No this part is the same actually. 


In our opinion it is just being represented in a little bit easier way actually. When you see a lookup column (formerly lookup field) on a record form, you can already tell that this Table (formerly called an Entity) has to have an N:1 there in some way. When you see a subgrid on a record form, you can already tell it has to have a 1:N in there for that Table (formerly called an Entity).


So that is why Dataverse is quite useful and powerful in this respect as it matches very well with database design concepts.


Let us know which part you think is very different from relational database design concepts.


Finally, here are some visual examples to help more with the above:




Account View


Contact View







Account Records:



Account 1 Record Form Subgrid listing both of the 1:N associated Contact Records





Account 2 Record Form Subgrid listing the associated 1:N associated Contact Records(there happens to just be one here, but there can be zero associated records, one associated record, or more than one associated record)





Contact Records:



Contact Number One  Record Form with lookup column (previously called a lookup field) N:1 pointing to Account 2: 





Contact Number Two  Record Form with lookup column (previously called a lookup field) N:1 pointing to Account 1: 





Contact Number Three Record Form with lookup column (previously called a lookup field) N:1 pointing to Account 1: 



In all three of the above screenshots of each Contact record, the lookup column (previously called a lookup field) points to exactly one Contact record. However, notice that more than one of these records can possibly point to the same record - that is why it is N:1 and not 1:1. 


In Dataverse, a true 1:1 relationship between two tables cannot be modeled natively in the specific way you might have in mind (without some specific potential workarounds), this might be the only real difference. A one to one relationship in Dataverse is  usually natively built as just another regular column (formerly called a field) on the same Table.


Moreover, note it is also possible for the lookup column (N:1) on a Contact record to be simply left blank and not point to any single Account record at all (unless it is set as a required field) - the relationship and lookup by themselves do not necessary imply that the record must be associated, only that it can be associated.


We also use the word record very often to deliver the following point.

The definition of a Table (formerly called an Entity) is very different from the actual records contained in that table. The 1:N relationship is best understood keeping the records of the Tables in mind. The records are the actual things that end up having the relationship with other records - the Tables are just the ones that determine through definitions of the relationships, that the relationships are possible between the records of those Tables in those specific ways. The lookup column is usually the hint of the N:1 relationship, and subgrid the sign of the 1:N relationship. Note that the column and the subgrid need not be actually present on the form for the relationship to exist, but if they are present, they are how you can easily tell the relationships and in what direction they are.


In other words, placing a subgrid on a form to show one, or more than one associated record from another table,
usually requires the 1:N relationship to be defined first between the two tables,

and placing a lookup column on a form to reference one associated record from another table,
usually requires the N:1 relationship to be defined first between the two tables.


Hope this helps.


Thank you for your prompt reply.


With the 1:N relationship where both the parent table and the child table have a currency column, I am able to populate the currency column on the parent table using rollup.


I have another column, which of data and time type, on the parent table and I want to auto-populate it with the value of one of the datetime column of the child table based on some condition. When I tried to do this, I do not even see the child table listed in the Entity list.


I am not sure if I have made myself clear.


Thank you again.




Canvas Apps can be embedded in Model Driven App Forms with context , so you could embed a Canvas App in a Model Driven App and implement the functionality in the Canvas App.


It is also possible to use instead a
web resource
Power Automate



(because Business Rules may or may not be enough to do this specific scenario)


Other than this, we are unsure if it possible to do this only from a calculated field or rollup field in this case.


We would be curious how to do this only with the Calculated Field or Rollup Field. It may be possible but we are not sure in your specific scenario how it would be done. For that we would welcome another user in this forum to suggest a solution using only the Calculated Field or Rollup Field - or to elaborate more on another possible approach.

@poweractivate ,

Thank you so much for the detailed explanation. 


Regarding the lookup column: you are right. I did not make myself clear. I did mean to say the lookup column of a table. I believe the table a lookup column points to (or references) is the lookup table. 


I now understand that this lookup concept is actually the same as it is in relational databases.


I also understand what the 1:N or N:1 relationship means. But somehow I still cannot get what I am trying to do.


Here is exactly what I am trying to do.


I have a contract table and an options table. A one-to-many relationship is set up between the contract and the options table, which means a contract has one or more options. Pretty straight forward.


On the contract table, I have a column of data and time type called RenewDate. And on the options table, there are some columns: StartDate, EndDate, isActive, fundingAmount, etc.


Now what I need is automatically populate the RenewDate on the parent table with the EndDate of the option that is Active.


When I was trying to use the calculate inteface to implement it, the interface does not even give the option to get to the options table. But the interface does give access to the lookup columns. This is where I need help.


It seems difficult to explain. Hope I made myself clear. 


Greatly appreciate your assistance.






@poweractivate ,


I do not necessarily have to use the calculated feature to achieve. This happens to be the only thing I know/learned for PowerApps. But I do want to achieve this from the Dataverse because I'd like to centralize the logic.







@JohnYu500 wrote:


On the contract table, I have a column of data and time type called RenewDate. And on the options table, there are some columns: StartDate, EndDate, isActive, fundingAmount, etc.


Now what I need is automatically populate the RenewDate on the parent table with the EndDate of the option that is Active.





One thing we notice here, is in this way you  set it up, more than one contract could have the isActive state set upon it. Presuming you do not want this, and presuming only one option must be active at a time - then using a web resource, Canvas App, or Power Automate could be insufficient as it would not enforce the integrity in the server side in a solid way, because for example suppose an embedded Canvas App has it all there. However the integrity rules can be violated from say a Model Driven App form, that is existing elsewhere, and then cause more than one Active option to occur, and violate the integrity. And also, we are unsure that  the simpler alternative one should always check first, the Business Rules can actually do something of this complexity - if they could though, those are enforced when the scope is set on the whole Table, so those would work if it were possible - but we are unsure Business Rules can do it for this scenario.


So it is likely a custom Plugin (this is written in C#) is needed to be developed and registered against the appropriate message on that Table, so that when the record is updated from the N side to set isActive to true, first it must fetch the associated record (the one side) by the Lookup Field - then it must enumerate all the N side of the records to see if any other associated record form the N side is set to Active. If one already is, it must throw the error message and then block the change attempt in the current record - then it will work.


The same Plugin can then also do as follows for rest of your functionality: If the condition above is false, then it will also just lookup the 1 side from that record N side and just go ahead and directly set that date you want from the N side, over on that field from the one side.


The same Plugin also can check - if the value is being changed from Yes to No on isActive, it can then clear the above one side's field to the blank value.


Now to implement this with the sample C# code, we would need to take quite some time to do this, it is very advanced to do this. If we happen to have some time to do this, we might reply with a specific sample and details of it so you can check it.


Which is why if someone else on this forum have the more creative idea than this, it is most welcome  and we would also be interested to know of it - in our opinion though, we are unsure if any of the possible creative ideas, do not have a tradeoff, such as that there is a way to set two isActive states outside of the app. The creative idea that other person may have, may have to suggest you to rethink the way you set up the data in the first place to avoid this pitfall.


If later we happen to have such idea, we might check back and let you know in a reply as well.


If you do not care if two isActive states are set, there may be more options such as the web resource - however, the moment we say "if you do not care if two isActive states are set" it already does not feel good, the only way we could feel comfortable with it with the way the data is set up is with custom Plugin so it is a very solid solution is what we can say for now.

You are right. There could be more than one option record that is IsActive (true).


I do care about data integrity and I planned to use Business Rules to enforce that although I have yet to figure out how to do this.


I seem to read from your message that the way I set up the relationship between these two tables is not appropriate. If this is the case, how would you set it up? I want to get my data model right. I am talking about U.S. federal contracts that usually have some option periods - which is a typical one-to-many relationship.  So it is natural to create a 1:N relationship between contract and options.


Hope I do not have to go through the custom C# code route.






@JohnYu500 wrote:

You are right. There could be more than one option record that is IsActive (true).


I do care about data integrity and I planned to use Business Rules to enforce that although I have yet to figure out how to do this.


I seem to read from your message that the way I set up the relationship between these two tables is not appropriate. If this is the case, how would you set it up? I want to get my data model right. I am talking about U.S. federal contracts that usually have some option periods - which is a typical one-to-many relationship.  So it is natural to create a 1:N relationship between contract and options.




The thing is we think you set this all up correctly in our opinion. We are unsure right now of another way to set it up to be honest with you. We were just saying we suspect there might be some other, different way to set it up (that could require some time to think of it), that would result in suddenly not having to go to the custom C# code route. However, right now we are not so sure what that way is.


For this reason - if we think of either a) the other way to avoid the custom C# route or b) to just do it that C# way and provide it to you (but this can take time, we'd have to check if we have the time to do this - you are also welcome to try it of course) - we would let you know if we have either of these two cases.


Right now we don't have either yet - so in the meantime we welcome the response from another perspective if someone else here on this forum would like to volunteer to check on this for you.

Helpful resources


Power Platform Connections - Episode 6 | March 23, 2023

Episode Six of Power Platform Connections sees David Warner and Hugo Bernier talk to talk to Business Applications MVP Shane Young, alongside the latest news, product updates, and community blogs.    Use the hashtag #PowerPlatformConnects on social media for a chance to have your work featured on the show!      Show schedule in this episode:  0:00 Cold Open 00:24 Show Intro 01:02 Shane Young Interview 22:00 Blogs & Articles 22:20 Integrate with Power Pages 23:50 Text Data 25:15 Zero to Hero Power Apps Saga 25:44 Parent Hub Association 26:33 Using Custom Values for OneNote Power Automate References​ 28:04 ​Dynamics Power Israel 28:44 Create Beautiful Canvas Apps in Dataverse for Teams ​ 30:36 Outro & Bloopers  Check out the blogs and articles featured in this week’s episode: @crmbizcoach @YerAWizardCat ​ @thevictordantas ​ @Expiscornovus @lshelton_Tech @MMe2K    Action requested: Feel free to provide feedback on how we can make our community more inclusive and diverse.  This episode premiered live on our YouTube at 12pm PST on Thursday 23rd March 2023.  Video series available at Power Platform Community YouTube channel.    Upcoming events:  Business Applications Launch – April 4th – Free and Virtual! M365 Conference - May 1-5th - Las Vegas Power Apps Developers Summit – May 19-20th - London European Power Platform conference – Jun. 20-22nd - Dublin Microsoft Power Platform Conference – Oct. 3-5th - Las Vegas  Join our Communities:  Power Apps Community Power Automate Community Power Virtual Agents Community Power Pages Community  If you’d like to hear from a specific community member in an upcoming recording and/or have specific questions for the Power Platform Connections team, please let us know. We will do our best to address all your requests or questions. 

Announcing | Super Users - 2023 Season 1

Super Users – 2023 Season 1    We are excited to kick off the Power Users Super User Program for 2023 - Season 1.  The Power Platform Super Users have done an amazing job in keeping the Power Platform communities helpful, accurate and responsive. We would like to send these amazing folks a big THANK YOU for their efforts.      Super User Season 1 | Contributions July 1, 2022 – December 31, 2022  Super User Season 2 | Contributions January 1, 2023 – June 30, 2023    Curious what a Super User is? Super Users are especially active community members who are eager to help others with their community questions. There are 2 Super User seasons in a year, and we monitor the community for new potential Super Users at the end of each season. Super Users are recognized in the community with both a rank name and icon next to their username, and a seasonal badge on their profile.    Power Apps  Power Automate  Power Virtual Agents  Power Pages  Pstork1*  Pstork1*  Pstork1*  OliverRodrigues  BCBuizer  Expiscornovus*  Expiscornovus*  ragavanrajan  AhmedSalih  grantjenkins  renatoromao    Mira_Ghaly*  Mira_Ghaly*      Sundeep_Malik*  Sundeep_Malik*      SudeepGhatakNZ*  SudeepGhatakNZ*      StretchFredrik*  StretchFredrik*      365-Assist*  365-Assist*      cha_cha  ekarim2020      timl  Hardesh15      iAm_ManCat  annajhaveri      SebS  Rhiassuring      LaurensM  abm      TheRobRush  Ankesh_49      WiZey  lbendlin      Nogueira1306  Kaif_Siddique      victorcp  RobElliott      dpoggemann  srduval      SBax  CFernandes      Roverandom  schwibach      Akser  CraigStewart      PowerRanger  MichaelAnnis      subsguts  David_MA      EricRegnier  edgonzales      zmansuri  GeorgiosG      ChrisPiasecki  ryule      AmDev  fchopo      phipps0218  tom_riha      theapurva  takolota     Akash17  momlo     BCLS776  Shuvam-rpa     rampprakash  ScottShearer     Rusk  ChristianAbata     cchannon  Koen5     a33ik        AaronKnox        Matren        Alex_10        Jeff_Thorpe        poweractivate        Ramole        DianaBirkelbach        DavidZoon        AJ_Z        PriyankaGeethik        BrianS        StalinPonnusamy        HamidBee        CNT        Anonymous_Hippo        Anchov        KeithAtherton        alaabitar        Tolu_Victor        KRider        sperry1625        IPC_ahaas      zuurg    rubin_boer   cwebb365      If an * is at the end of a user's name this means they are a Multi Super User, in more than one community. Please note this is not the final list, as we are pending a few acceptances.  Once they are received the list will be updated. 

Microsoft Power Platform Conference | Registration Open | Oct. 3-5 2023

We are so excited to see you for the Microsoft Power Platform Conference in Las Vegas October 3-5 2023! But first, let's take a look back at some fun moments and the best community in tech from MPPC 2022 in Orlando, Florida.   Featuring guest speakers such as Charles Lamanna, Heather Cook, Julie Strauss, Nirav Shah, Ryan Cunningham, Sangya Singh, Stephen Siciliano, Hugo Bernier and many more.   Register today:   

Check out the new Power Platform Communities Front Door Experience!

We are excited to share the ‘Power Platform Communities Front Door’ experience with you!   Front Door brings together content from all the Power Platform communities into a single place for our community members, customers and low-code, no-code enthusiasts to learn, share and engage with peers, advocates, community program managers and our product team members. There are a host of features and new capabilities now available on Power Platform Communities Front Door to make content more discoverable for all power product community users which includes ForumsUser GroupsEventsCommunity highlightsCommunity by numbersLinks to all communities Users can see top discussions from across all the Power Platform communities and easily navigate to the latest or trending posts for further interaction. Additionally, they can filter to individual products as well.       Users can filter and browse the user group events from all power platform products with feature parity to existing community user group experience and added filtering capabilities.     Users can now explore user groups on the Power Platform Front Door landing page with capability to view all products in Power Platform.    Explore Power Platform Communities Front Door today. Visit Power Platform Community Front door to easily navigate to the different product communities, view a roll up of user groups, events and forums.

Welcome to the Power Apps Community

Welcome! Congratulations on joining the Microsoft Power Apps community! You are now a part of a vibrant group of peers and industry experts who are here to network, share knowledge, and even have a little fun! Now that you are a member, you can enjoy the following resources:   The Microsoft Power Apps Community Forums If you are looking for support with any part of Microsoft Power Apps, our forums are the place to go. They are titled "Get Help with Microsoft Power Apps " and there you will find thousands of technical professionals with years of experience who are ready and eager to answer your questions. You now have the ability to post, reply and give "kudos" on the Power Apps community forums! Make sure you conduct a quick search before creating a new post because your question may have already been asked and answered!   Microsoft Power Apps IdeasDo you have an idea to improve the Microsoft Power Apps experience, or a feature request for future product updates? Then the "Power Apps Ideas" section is where you can contribute your suggestions and vote for ideas posted by other community members. We constantly look to the most voted Ideas when planning updates, so your suggestions and votes will always make a difference.   Community Blog & NewsOver the years, more than 600 Power Apps Community Blog Articles have been written and published by our thriving community. Our community members have learned some excellent tips and have keen insights on building Power Apps. On the Power Apps Community Blog, read the latest Power Apps related posts from our community blog authors around the world. Let us know if you would like to become an author and contribute your own writing — everything Power Apps related is welcome!   Power Apps Samples, Learning and Videos GalleriesOur galleries have a little bit of everything to do with Power Apps. Our galleries are great for finding inspiration for your next app or component. You can view, comment and kudo the apps and component gallery to see what others have created! Or share Power Apps that you have created with other Power Apps enthusiasts. Along with all of that awesome content, there is the Power Apps Community Video & MBAS gallery where you can watch tutorials and demos by Microsoft staff, partners, and community gurus in our community video gallery.   Again, we are excited to welcome you to the Microsoft Power Apps community family! Whether you are brand new to the world of process automation or you are a seasoned Power Apps veteran. Our goal is to shape the community to be your ‘go to’ for support, networking, education, inspiration and encouragement as we enjoy this adventure together!   Let us know in the Community Feedback if you have any questions or comments about your community experience.To learn more about the community and your account be sure to visit our Community Support Area boards to learn more! We look forward to seeing you in the Power Apps Community!The Power Apps Team

Microsoft Power Platform | March 2023 Newsletter

Welcome to our March 2023 Newsletter, where we'll be highlighting the great work of our members within our Biz Apps communities, alongside the latest news, video releases, and upcoming events. If you're new to the community, be sure to subscribe to the News & Announcements and stay up to date with the latest news from our ever-growing membership network who find real "Power in the Community".    LATEST NEWS Power Platform Connections Check out Episode Five of Power Platform Connections, as David Warner II and Hugo Bernier chat with #PowerAutomate Vice President, Stephen Siciliano, alongside reviewing out the great work of Vesa Juvonen, Waldek Mastykarz, Maximilian Müller, Kristine Kolodziejski, Danish Naglekar, Cat Schneider, Victor Dantas, and many more.   Use the hashtag #PowerPlatformConnects on social media for a chance to have your work featured on the show!   Did you miss an episode?  Catch up now in the Community Connections Galleries Power Apps, Power Automate, Power Virtual Agents, Power Pages     Power Platform leading a new era of AI-generated low-code development.   **HOT OFF THE PRESS** Fantastic piece here by Charles Lamanna on how we're reinventing software development with Copilot in Power Platform to help you can build apps, flows, and bots with just a simple description! Click here to see the Product Blog         Copilot for Power Apps - Power CAT Live To follow on from Charles' blog, check out #PowerCATLive as Phil Topness gives Clay Wesener Wesner a tour of the capabilities of Copilot in Power Apps.       UPCOMING EVENTS   Modern Workplace Conference Check out the Power Platform and Microsoft 365 Modern Workplace Conference that returns face-to-face at the Espace St Martin in Paris on 27-28th March. The #MWCP23 will feature a wide range of expert speakers, including Nadia Yahiaoui, Amanda Sterner, Pierre-Henri, Chirag Patel, Chris Hoard, Edyta Gorzoń, Erika Beaumier, Estelle Auberix, Femke Cornelissen, Frank POIREAU, Gaëlle Moreau, Gilles Pommier, Ilya Fainberg, Julie Ecolivet, Mai-Lynn Lien, Marijn Somers, Merethe Stave, Nikki Chapple, Patrick Guimonet, Penda Sow, Pieter Op De Beéck, Rémi Riche, Robin Doudoux, Stéphanie Delcroix, Yves Habersaat and many more.  Click here to find out more and register today!     Business Applications Launch 2023 Join us on Tuesday 4th April 2023 for an in-depth look into the latest updates across Microsoft Power Platform and Microsoft Dynamics 365 that are helping businesses overcome their biggest challenges today. Find out about new features, capabilities, and best practices for connecting data to deliver exceptional customer experiences, collaborating and creating using AI-powered capabilities, driving productivity with automation, and building future growth with today’s leading technology. Click Here to Register Today!       Power Platform Conference 2023 We are so excited to see you for the Microsoft Power Platform Conference in Las Vegas October 3-5th, 2023! But first, let's take a look below at some fun moments from MPPC 2022 in Orlando Florida. 2023 sees guest speakers such as Charles Lamanna, Heather Cook, Julie Strauss, Nirav Shah, Ryan Cunningham, Sangya Singh, and many more taking part, so why not click the link below to register for the #PowerPlatformConf today! Vegas, baby! Click Here to Register Today!      COMMUNITY HIGHLIGHTS Check out our top Super and Community Users reaching new levels!  These hardworking members are posting, answering questions, kudos, and providing top solutions in their communities.   Power Apps:  Super Users:  @WarrenBelz  |  @iAm_ManCat  Community Users: @LaurensM | @Rusk | @RJM07    Power Automate:   Super Users: @abm  | @Expiscornovus | @RobElliott  Community Users:  @grantjenkins | @Chriddle    Power Virtual Agents:   Super Users: @Expiscornovus | @Pstork1  Community Users: @MisterBates | @Jupyter123 | Kunal K   Power Pages: Super Users:  @OliverRodriguesOliverRodrigues | @Mira_Ghaly  Community Users: @FubarFubar | @ianwukianwuk  LATEST PRODUCT BLOG ARTICLES  Power Apps Community Blog  Power Automate Community Blog  Power Virtual Agents Community Blog  Power Pages Community Blog  Check out 'Using the Community' for more helpful tips and information:  Power Apps, Power Automate, Power Virtual Agents, Power Pages 

Top Solution Authors
Top Kudoed Authors
Users online (1,677)