Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
mitchperkins
Regular Visitor

Applying a Calculated Column if a Column from Another Table Equals a Specific Value

I have two tables. 'Table A' holds general opportunity information, and 'Table B' holds specific information about the opportunities. The table relationship is formed on the Opportunity_ID.

 

We have different commission calculations for different sale types. I have created each commission calculation as calculated columns in Table A, using other Table A columns. Ex. 'Table A'[Commission_Agreement Renewal] = ([cycles]/12)*[Recurring_Revenue].

 

Table B has a column with the sale type information ([Sale Type] = Agreement Renewal).

 

I need to create a column in Table A that can provide the sale commission dependent on the sale type. My intital reaction was to write a nested IF statement that was along the lines of:
Commission = IF ( RELATED ( 'Table B'[Sale Type] ) = Agreement Renewal,
[Commission_Agreement Renewal],

IF ( RELATED ( 'Table B'[Sale Type] ) = New RMR System, [Commission_New RMR System],

(pretend there are 5 or so more lines of sale types following the same format),

0)

 

I receive errors about not finding a single value for [Sale Type] most times that I try it, but no matter how I attempt to get around it, I seem to receive another error.

 

Any ideas as to how I would accomplish this?

1 ACCEPTED SOLUTION
selimovd
Most Valuable Professional
Most Valuable Professional

Hey @mitchperkins ,

 

can you also share the relationship of the two tables?

Usually a RELATED gives back a single value, but as you said there is an error I would like to see the relationship.

 

Did you break the formula down to maybe only one IF and see if that works? I would do that before creating a very long IF-statement.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

View solution in original post

2 REPLIES 2
selimovd
Most Valuable Professional
Most Valuable Professional

Hey @mitchperkins ,

 

can you also share the relationship of the two tables?

Usually a RELATED gives back a single value, but as you said there is an error I would like to see the relationship.

 

Did you break the formula down to maybe only one IF and see if that works? I would do that before creating a very long IF-statement.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

I reviewed the relationship between the two tables and discovered that it had been set up incorrectly.

 

Thank you, it is working now!

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.