The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Im getting the error like "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." when trying to write a dax expression
% TL Refusal =
DIVIDE(
CALCULATE(DISTINCTCOUNT('Facts'[Customer]),[TL Refusal (QLI)]=0),
CALCULATE(DISTINCTCOUNT('Facts'[Customer]),'Facts'[Status]="Return"))
Here [TL Refusal (QLI)] is a measure and Customer, Status are columns in Fact table.
TIA
Solved! Go to Solution.
The error message you're encountering indicates that there's an issue with how you're using the True/False expression within your DAX calculation. In DAX, when you're using expressions like [TL Refusal (QLI)]=0 or 'Facts'[Status]="Return", they need to evaluate to a True or False value, but they should be related to specific columns.
In your calculation, it seems like you're trying to calculate the percentage of customers where TL Refusal (QLI) is equal to 0, and the status is "Return". However, the structure of your calculation might be causing the issue.
Here's how you can revise your DAX expression:
% TL Refusal =
DIVIDE(
CALCULATE(
DISTINCTCOUNT('Facts'[Customer]),
'Facts'[TL Refusal (QLI)] = 0,
'Facts'[Status] = "Return"
),
CALCULATE(
DISTINCTCOUNT('Facts'[Customer]),
'Facts'[Status] = "Return"
)
)
In this revision, I've modified the CALCULATE function to include the conditions 'Facts'[TL Refusal (QLI)] = 0 and 'Facts'[Status] = "Return" within it. This ensures that each condition is associated with the appropriate column from the 'Facts' table.
Please replace 'Facts'[TL Refusal (QLI)] and 'Facts'[Status] with the correct column names if they are different. Make sure the column names and table names are correct, as DAX is case-sensitive. This revision should resolve the error you're encountering.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.
The error message you're encountering indicates that there's an issue with how you're using the True/False expression within your DAX calculation. In DAX, when you're using expressions like [TL Refusal (QLI)]=0 or 'Facts'[Status]="Return", they need to evaluate to a True or False value, but they should be related to specific columns.
In your calculation, it seems like you're trying to calculate the percentage of customers where TL Refusal (QLI) is equal to 0, and the status is "Return". However, the structure of your calculation might be causing the issue.
Here's how you can revise your DAX expression:
% TL Refusal =
DIVIDE(
CALCULATE(
DISTINCTCOUNT('Facts'[Customer]),
'Facts'[TL Refusal (QLI)] = 0,
'Facts'[Status] = "Return"
),
CALCULATE(
DISTINCTCOUNT('Facts'[Customer]),
'Facts'[Status] = "Return"
)
)
In this revision, I've modified the CALCULATE function to include the conditions 'Facts'[TL Refusal (QLI)] = 0 and 'Facts'[Status] = "Return" within it. This ensures that each condition is associated with the appropriate column from the 'Facts' table.
Please replace 'Facts'[TL Refusal (QLI)] and 'Facts'[Status] with the correct column names if they are different. Make sure the column names and table names are correct, as DAX is case-sensitive. This revision should resolve the error you're encountering.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.
User | Count |
---|---|
28 | |
10 | |
8 | |
6 | |
5 |
User | Count |
---|---|
33 | |
13 | |
12 | |
9 | |
7 |