Forum

How to resolve "A f...
 
Notifications
Clear all

How to resolve "A function PLACEHOLDER has been used in a True/False expression"

2 Posts
2 Users
0 Reactions
3,712 Views
(@jimmyexpat)
Posts: 17
Eminent Member
Topic starter
 

Hi,

The following measure within Power BI which returns the error:

A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filter expression. This is not allowed.

M.New.EnglishTarget = IF(ISBLANK(CALCULATE(COUNT('dt_ReadingSummary'[Candidate_Number]), 'dt_ReadingSummary'[English Target Hit]=1 && 'dt_ReadingSummary'[CompletedBooks]>0)/COUNT('dt_ReadingSummary'[Candidate_Number])),0,(CALCULATE(COUNT('dt_ReadingSummary'[Candidate_Number]), 'dt_ReadingSummary'[English Target Hit]=1 && 'dt_ReadingSummary'[CompletedBooks]>0)/COUNT('dt_ReadingSummary'[Candidate_Number])))

 
The text in red was added to the filter out any students that had not completed any books.
 
The intention is to calculate a % of students who have hit their reading levels within the month - the month being controlled via a slicer.
 
I don't quite understand where in the formula the Placeholder is that the error is referring to.
 
Thanks for reading and any advice appreciated
 
Posted : 13/12/2023 6:46 am
Riny van Eekelen
(@riny)
Posts: 1195
Member Moderator
 

As similar question came up not too long ago where a filter expressions were used inside a CALCULATE function, without explicitly using the FILTER function. It worked very well in my Excel version with Power Pivot as well as in my Power BI desktop app.

The attached file contain a simplified example with two measures. One without FILTER and one with. Both give the same result for me. See if the second one works on your end.

 
Posted : 13/12/2023 7:55 am
Share: