Forum Discussion
A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filte
I am trying to create a measure that will count how many areas have had at least 2/5 categories with a value between 0.05 and 0.38 but keep getting the error message:
KPI599 =
VAR ConditionCount =
(
IF(BBAS[SAFE] >= 0.05 && BBAS[SAFE] <= 0.38, 1, 0) +
IF(BBAS[CARING] >= 0.05 && BBAS[CARING] <= 0.38, 1, 0) +
IF(BBAS[RESPONSIVE] >= 0.05 && BBAS[RESPONSIVE] <= 0.38, 1, 0) +
IF(BBAS[WELLED] >= 0.05 && BBAS[WELLED] <= 0.38, 1, 0) +
IF(BBAS[EFFECTIVE] >= 0.05 && BBAS[EFFECTIVE] <= 0.38, 1, 0)
)
RETURN
CALCULATE(
DISTINCTCOUNT(BBAS[Area]),
ConditionCount >= 2
)
The placeholder is your calculation for ConditionCount.
Have a read of this article to understand why it's happening: https://www.sqlbi.com/articles/solving-errors-in-calculate-filter-arguments/
In your case, I reckon the solution would be to change the last part to FILTER(Table, ConditionCount >= 2)Can you just create a if statement in your return :
If(
ConditionCount >=2,CALCULATE( DISTINCTCOUNT(BBAS[Area]))
2 Replies
- vicky_
Super User
The placeholder is your calculation for ConditionCount.
Have a read of this article to understand why it's happening: https://www.sqlbi.com/articles/solving-errors-in-calculate-filter-arguments/
In your case, I reckon the solution would be to change the last part to FILTER(Table, ConditionCount >= 2) - Bmejia
Super User
Can you just create a if statement in your return :
If(
ConditionCount >=2,CALCULATE( DISTINCTCOUNT(BBAS[Area]))