I am attempting to create a calculation column IF statement between two dates in Power BI.
At the moment, I want it to look at the two dates (in two tables). If they match, return "True" and if not return "False".
On Time? =
IF (
TB1[C1]
= TB2[C1],
"Yes",
"No"
)
The error I get is;
A single value for column 'C1' in table 'TB1' cannot be determined.
This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or
sum to get a single result.
A sample of data is:
TABLE A TABLE B
02 September 2010 02 September 2010
02 September 2010 03 September 2010
30 August 2010 29 August 2010
What Syntax should I be using in order to get the results I want?
Thanks
On Time
column in table A, you'll have to find the corresponding comparison row from table B. If there's no relationship between the tables defined in your model, you use the LOOKUPVALUE function by matching values from the current row in A against columns in B. Be aware, though, that this fails if it can't match only one unique value. – mthierbaIF(TB1[C1]=RELATED(TB2[C1]),"Yes","No")
. Assuming, this is a calculated column in TB1. – mthierba