Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
I am trying to create a calculated column, but I need to do 2 different calculations based on ID number. I have a table of the Exempt ID numbers, a table with the Employee data, and a table that contains the actual data values.
Table Names
Exempt Employees - table that includes ID numbers that I want to do a different calculation for.
Employee Data - table that contains employee information and connects all the data sources
Main - table that includes the data values by employee number.
Pretty much, I want to have 2 sets of calculations based on if their ID number is in the Exempt Employee Table.
What is the best way to do this? I can also change the relationships between the 3 tables if there is a solution that way too.
Solved! Go to Solution.
Hi @jasmin_w
For your question, here is the method I provided:
Here's some dummy data
“Exempt Employees”
“Employee”
“Main”
Relationships between tables.
Create a Calculated Column. This function queries whether the ID returned from the Exempt Employees table is a relevant value indicating that the employee is exempt.
Salary Calculation =
var _isExempt =
NOT(
ISBLANK(
RELATED('Exempt Employees'[ID])
)
)
RETURN
IF(
_isExempt,
('Main'[Base Salary] * 'Main'[Multiplier] * 0.8) / 4,
('Main'[Base Salary] * 'Main'[Multiplier] ) / 4
)
Here is the result.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
In which of those 3 tables do you want to write those formulas? Share the download link of the PBI file.
Hi @jasmin_w
For your question, here is the method I provided:
Here's some dummy data
“Exempt Employees”
“Employee”
“Main”
Relationships between tables.
Create a Calculated Column. This function queries whether the ID returned from the Exempt Employees table is a relevant value indicating that the employee is exempt.
Salary Calculation =
var _isExempt =
NOT(
ISBLANK(
RELATED('Exempt Employees'[ID])
)
)
RETURN
IF(
_isExempt,
('Main'[Base Salary] * 'Main'[Multiplier] * 0.8) / 4,
('Main'[Base Salary] * 'Main'[Multiplier] ) / 4
)
Here is the result.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you so much. This worked perfectly!
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 48 | |
| 46 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 67 | |
| 32 | |
| 27 | |
| 26 |