Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Unanswered

Dataverse Power fx formula for columns in 2 different tables

(0) ShareShare
ReportReport
Posted on by

Hi! I want to add a subtraction formula for my column in table A but the other column is in table B [Column 1 (Table A) - Column 2 (Table B)].

 

Is this possible? 

 

 

  • Community Power Platform Member Profile Picture
    on at
    Re: Dataverse Power fx formula for columns in 2 different tables

    following up on this?

     

  • Community Power Platform Member Profile Picture
    on at
    Re: Dataverse Power fx formula for columns in 2 different tables

    Hi @AhmedSalih here are my tables and the relevant columns. The YEAR MAKE MODEL TRIM column will be the lookup value where for example for a 2022 Chevrolet Silverado 1500 WT vehiclethe Quantity to Buy is = 5, then 2 vehicle purchasers (person A and person B) each were able to buy 1 car of the exact vehicle  type (2022 Chevrolet Silverado 1500 WT). The updated quantity to buy should now be 3 given the formula below in Table A.

    TABLE A - Vehicles to Purchase

    Columns:

    1. Year Make Model Trim
    2. Quantity to Buy
    3. Updated Quantity to Buy = Quantity to Buy - Number of Vehicles Bought

     

    TABLE B - Purchase Vehicles

    1. Year Make Model Trim
    2. Number of Vehicles Bought

    I don't have a Foreign and Primary Key

  • AhmedSalih Profile Picture
    6,678 Super User 2025 Season 1 on at
    Re: Dataverse Power fx formula for columns in 2 different tables

    @Anonymous, can you share your tables schemas? the Columns' names and data samples? Also, do you have a Primary Key and Foreign Key?

  • Community Power Platform Member Profile Picture
    on at
    Re: Dataverse Power fx formula for columns in 2 different tables

    @AhmedSalih thank you so much!! one last question, how do I set the look-up column in table B?  when I set up the lookup column, it somehow automatically chose a column in table B. I wanted to select another column.

  • AhmedSalih Profile Picture
    6,678 Super User 2025 Season 1 on at
    Re: Dataverse Power fx formula for columns in 2 different tables

    Hello, @Anonymous, yes it is doable if you have a relationship between the two tables. You have to have a Lookup Column in Table A that is linked to Table B. Use a formula that looks something like this:

    (TableAvalue-LookUpColumnName.ColumnNameInTableB) << ColumnNameInTableB is where you have your value to subtract.

     

     

    If my reply helped you, please give a 👍 , & if it solved your issue, please 👍 & Accept it as the Solution to help other community members find it more.


    I am primarily available on weekdays from 6-10 PM CT and 5-10 PM CT on weekends.


    Visit my Blog: www.powerplatformplace.com


     

     

     

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Microsoft Dataverse

#1
mmbr1606 Profile Picture

mmbr1606 22 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 19

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 17 Super User 2025 Season 1

Overall leaderboard

Featured topics