Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I want to embed calculation into a DAX IF statement. This shouldn't be hard. On each line of a report (one employee per line):
If an employee is salaried, I want to use the PayRate as the Wage.
If the employee is hourly, I want to multiply the PayRate by the Hours to get Wage.
But I'm getting an error:
The command is:
Solved! Go to Solution.
Hi @adraus ,
Please try this:-
Measure =
IF (
MAX ( CompFixedEmpls[Plan] ) = "Salary",
SELECTEDVALUE ( CompFixedEmpls[PayRate] ),
SELECTEDVALUE ( CompFixedEmpls[PayRate] )
* SELECTEDVALUE ( PositionsV2[AnnualRegularHours] )
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @adraus ,
Please try this:-
Measure =
IF (
MAX ( CompFixedEmpls[Plan] ) = "Salary",
SELECTEDVALUE ( CompFixedEmpls[PayRate] ),
SELECTEDVALUE ( CompFixedEmpls[PayRate] )
* SELECTEDVALUE ( PositionsV2[AnnualRegularHours] )
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
12 | |
11 | |
8 | |
7 | |
7 |
User | Count |
---|---|
20 | |
14 | |
11 | |
10 | |
10 |