The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi,
I'm a newish user to PowerBI and struggling with a calculation.
I'm getting the error "A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filter exp" when I try to create a measure like below:
% LTP BOD_Test =
IF (
CALCULATE (
DISTINCTCOUNT ( 'Delivery'[BOD] ),
'Delivery'[BOD_LTP or TP_Measure] = "LTP"
)
= BLANK (),
0,
DIVIDE (
CALCULATE (
DISTINCTCOUNT ( 'Delivery'[BOD] ),
'Delivery'[BOD_LTP or TP_Measure] = "LTP"
),
CALCULATE (
DISTINCTCOUNT ( 'Delivery'[BOD] ),
FILTER (
'Delivery',
'Delivery'[BOD_LTP or TP_Measure] <> BLANK ()
)
)
)
)
Solved! Go to Solution.
Hi @Sri57
This is due to the reference to Measure in the filter parameter of the CALCULATE function. The following documentation lists the cases in which this error occurs, so perhaps it can help you.
Solving errors in CALCULATE filter arguments - SQLBI
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Sri57
This is due to the reference to Measure in the filter parameter of the CALCULATE function. The following documentation lists the cases in which this error occurs, so perhaps it can help you.
Solving errors in CALCULATE filter arguments - SQLBI
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Is
[BOD_LTP or TP_Measure]
an actual measure?
Please provide more details. What's its definition?
@lbendlin BOD_LTP or TP_Measure =
var a = MAX('Delivery'[Pallet per BOD])
return
IF (
ISBLANK (a),
BLANK (),
IF (
a < 16,
"LTP",
"TP"
)
)
[Pallet per BOD] is again a calculated column
User | Count |
---|---|
15 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
20 | |
12 | |
9 | |
7 |