Forum Discussion
CalculateTable Error " The True/False expression does not specify a column.
Why I am getting an error for this measure? Can you please advise where i am doing wrong and how to fix it?
"The True/False expression does not specify a column. Each True/False expressions used as a table filter expression must refer to exactly one column."
UC_Churn Rate_Test =
VAR TotalAmountCurrentYear = SUM(SalesOrder[#UC_Revenue_GBP_Year-0])
VAR TotalAmountLastYear = SUM(SalesOrder[#UC_Revenue_GBP_Year-1])
VAR TotalAmountTwoYearsAgo = SUM(SalesOrder[#UC_Revenue_GBP_Year-2])
VAR ChurnedCustomers =
CALCULATETABLE(
VALUES(SalesOrder[#UC_SHP_TO_ACCOUNT_AND_NAME]),
TotalAmountLastYear = 0
&& TotalAmountTwoYearsAgo > 0
)
VAR FilteredChurnedCustomers =
FILTER(
ChurnedCustomers,
SalesOrder[#UC_SHP_TO_ACCOUNT_AND_NAME] IN VALUES(SalesOrder[#UC_SHP_TO_ACCOUNT_AND_NAME])
)
RETURN
DIVIDE(
COUNTROWS(FilteredChurnedCustomers),
COUNTROWS(VALUES(SalesOrder[#UC_SHP_TO_ACCOUNT_AND_NAME]))
)
3 Replies
- Kishore_KVNSolution Sage
Hello Anonymous ,
TotalAmountLastYear = 0
&& TotalAmountTwoYearsAgo > 0these two are variables and CalculateTable function requires a column as reference here where you are providing a single value. So modify this it may work.
If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!
- AnonymousNot applicable
do you mean like this?
CALCULATETABLE(VALUES(SalesOrder[#UC_SHP_TO_ACCOUNT_AND_NAME]),FILTER(ALL(SalesOrder),TotalAmountLastYear = 0&& TotalAmountTwoYearsAgo > 0))
- Kishore_KVNSolution Sage
Yes, I can't rewrite the complete measure because its referring to multiple columns and calculations which is difficult for me to recreate. That is the error location that I can identify.