I am trying to set up some summary information and can’t seem to get past the “Cannot compare List with Text”. This is how the data is structured.
Here is a statement I have tried. Glider is the name of glider column from the list spreadsheet where I want the summary data. The summary will be a virtual column. Bluebook log is the spreadsheet with Aircraft column having the name of the glider that the particular row refers to.
COUNT(SELECT(Bluebook log[Aircraft],(Bluebook log[Aircraft] = [_THISROW].[Gliders])))
Here is the error
Cannot compare List with Text in (BLUEBOOK LOG[Aircraft] = [Key].[Gliders])
Can I get some advice on how to properly do this?
Bluebook log[Aircraft]
is a column reference that produces the list of the values in the Aircraft column of the Bluebook log table. This is the “List” the error refers to. The expression, (Bluebook log[Aircraft] = [_THISROW].[Gliders])
, attempts to compare that list of values to a single Text value from the Gliders column of the current row.
What I suspect want is to compare the Gliders value with the Aircraft column value of each row in the Bluebook log table. To do that, omit the table name with the Aircraft column value reference: ([Aircraft] = [_THISROW].[Gliders])
. This makes you COUNT() expression:
COUNT(SELECT(Bluebook log[Aircraft],([Aircraft] = [_THISROW].[Gliders])))
See also:
That was easy. Works like a charm. Thanks!
User | Count |
---|---|
41 | |
36 | |
30 | |
23 | |
16 |