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.
Hi all! I am a novice at DAX and am trying to write an IF statement
Solved! Go to Solution.
@aduguid , finally got it to work using this
You just had an end ")" after the .92
SLOTS TO REACH 92% =
CALCULATE(
IF('FILL RATE QUERY'[% FILLED] < 0.92
, (0.92 - 'FILL RATE QUERY'[% FILLED]) * (DIVIDE('FILL RATE QUERY'[CONTRACT HOURS], 2, 0) )
, 0
)
)
I would also suggest either storing the percent as a measure or variable.
SLOTS TO REACH 92% =
VAR _percent_reach = 0.92
VAR _result =
CALCULATE(
IF('FILL RATE QUERY'[% FILLED] < _percent_reach
, (_percent_reach - 'FILL RATE QUERY'[% FILLED]) * (DIVIDE('FILL RATE QUERY'[CONTRACT HOURS], 2, 0) )
, 0
)
)
RETURN
_result
@aduguid Thank you for the quick response! When I try to use either of these "FILL RATE QUERY' [CONTRACT HOURS] is no longer an option and I get an error message when I try to use it. Any suggestions?
@aduguid , finally got it to work using this
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
18 | |
15 | |
12 | |
11 | |
8 |
User | Count |
---|---|
24 | |
17 | |
11 | |
11 | |
10 |