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 / Dataverse table with C...
Power Apps
Answered

Dataverse table with Calculated column using a related table field

(0) ShareShare
ReportReport
Posted on by 6

Hi,

I'm a newbie on all this. Apologies in advance if this is really a simple question. I have been looking through the documentation and trying with Copilot for hours without any luck.

I have two tables "Clients" and "Proposals" as follow:

tblClients
Name Code
Company A 101
Company B 253
Company C 305
 
tblProposals
Title Client (Look up) Request date Proposal Code
Proposal A Company A 02/10/24 101-241002
Proposal B Company C 15/11/25 305-251115
Proposal C Company C 01/03/26 305-260311
 
I'm struggling with the creation of the "Proposal Code" calculated column based on the selection on the Lookup column (tblProposals.Client) and the Request date (format YYMMDD).
I also want "Proposal Code" column to be the main column to be the reference for Proposals lookup in other tables.
 
Thanks in advance.
I have the same question (0)
  • Verified answer
    Sunil Kumar Pashikanti Profile Picture
    1,353 Moderator on at
     
    Use a Dataverse Formula (fx) column (Power Fx) on tblProposals, it can reference fields from the related lookup record and do string math. Avoid Text(Date) (not supported in all formula-column contexts); build the date parts with Year/Month/Day and format each to two digits. 

    Formula column (Text) on tblProposals 
    Concatenate(
        'Client'.'Code',
        "-",
        Right(Text(Year('Request date'), "####"), 2),   // YY
        Text(Month('Request date'), "00"),              // MM
        Text(Day('Request date'), "00")                 // DD
    )
    'Client' is the lookup column name on Proposals; accessing .'Code' pulls the client’s code.
    This avoids the known limitation where Text(DateValue) isn’t allowed in formula columns.
    Formula columns are the current, recommended way to compute values in Dataverse.
     
    Dataverse lookups show the table’s Primary Name column by default. You can’t set a formula column as Primary Name; Primary Name must be Text or Autonumber.
     
    Two practical options:
    1) Copy Proposal Code into Primary Name (Text) using a tiny Power Automate flow (on create/update of Client or Request date). Then lookups will show the code.
    2) Keep your Primary Name as an Autonumber and add “Proposal Code” to the Lookup View so users see it alongside the name (they’ll still click the primary).
     
    REferences:
     
     
    ✅ If this answer helped resolve your issue, please mark it as Accepted so it can help others with the same problem.
    👍 Feel free to Like the post if you found it useful.
     
     
     
     
  • MATMASS Profile Picture
    6 on at
    Sunil,

    Thanks for your answer.

    However, I cannot get the code to work. The first two arguments in the Concatenate function work fine ("Client.Code" and the "-"). 
    The second part for extracting the date in YYMMDD format does not work., I get an error as shown below:
     
     
  • Verified answer
    scalca Profile Picture
    252 Moderator on at
    check this blog post
     
    you have to use Time zone adjustment: Time zone independent 
    obviously it works also if you have date only field as well

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 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard