Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I'm trying to replicate a table created by a SQL Query in DAX with a Computed Table. I'm getting the error "A Function 'PLACEHOLDER' has been used in a True/False expression that isused as a table filter expression. This is not allowed."
If anyone's able to review the original SQL code and give feedback on my attempts at replicating in DAX, it would be much appreciated!
Here's the original SQL Code:
SELECT Left([KMS],2) AS YearOfRec, [Table].KMS AS [Number of Reports], Count([Table].RecommendationNumber) AS [Number of Unimplemented Recommendations], Sum(IIf([PriorPeriodAdj]<>0 And [PriorPeriodAdjDate]<[Forms]![frm_SummaryTableSAR]![Text_PeriodStart],QCAdjusted([Questioned],[PriorPeriodAdj]),[Questioned])) AS QuestionedCostA, Sum([Table].BetterUse) AS SumOfBetterUse, Sum([Table].QuestionedSustained) AS SumOfQuestionedSustained, [Table].ResolutionDate
FROM [Table]
WHERE
(
(
(
([Table].KMS) Like "??-1-???" Or ([Table].KMS) Like "??-2-???" Or ([Table].KMS) Like "??-3-???" Or ([Table].KMS) Like "??-6-???")
)
AND (([Table].ActIssueDate)<=Forms!frm_SummaryTableSAR!Text_PeriodStart)
AND (([Table].FinalActionDate) Is Null)
AND (([Table].Rec_Status_Text)<>"NoLongerApplicable")
)
OR
(
(
(
([Table].KMS) Like "??-1-???" Or ([Table].KMS) Like "??-2-???" Or ([Table].KMS) Like "??-3-???" Or ([Table].KMS) Like "??-6-???")
)
AND (([Table].ActIssueDate)<=Forms!frm_SummaryTableSAR!Text_PeriodStart)
AND (([Table].FinalActionDate)>Forms!frm_SummaryTableSAR!Text_PeriodEnd)
AND (([Table].Rec_Status_Text)<>"NoLongerApplicable")
)
)
GROUP BY Left([KMS],2), [Table].KMS, [Table].ResolutionDate;
I've done the following in Power Query:
1. Created the Table
2. Created a computed column "Report Title FY" to replace LEFT([KMS],2)
3. Created a computed column "Report Type" to replace (KMS) Like "??-X-???"
Then, in Power BI, I:
4. To replace [Forms]![frm_SummaryTableSAR]![Text_PeriodStart]
created measure:
5. To replace Sum(IIf([PriorPeriodAdj]<>0 And [PriorPeriodAdjDate]<[Forms]![frm_SummaryTableSAR]![Text_PeriodStart],QCAdjusted([Questioned],[PriorPeriodAdj]),[Questioned])) AS QuestionedCostA
created measure:
SummaryA_CalcTable_QuestionedCostA = IF(
MIN('All Projects wRecs'[Prior Period Adj Date])< SAR_Period_DateDim[SAR_START]
&&
MIN('All Projects wRecs'[Prior Period Adjustment]) <> 0,
SUMX('All Projects wRecs',[Sum of Questioned Costs] + [Sum of Prior Period Adj]),
SUM('All Projects wRecs'[Sum of Questioned Costs])
)
6. To replace Forms!frm_SummaryTableSAR!Text_PeriodEnd
created measure:
The error message is giving you the guidance on how to fix it. Work on defangling your filter statement. Remove all filters and then add them in one by one to see where it breaks. You will also be able to use variables to work around the "multiple sources" issue.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
10 | |
7 | |
6 | |
6 |
User | Count |
---|---|
30 | |
11 | |
11 | |
10 | |
6 |