I have the following data structure:
Scope,Metric ID,Item ID,System,Color
TRUE,A1,123,A,Red
FALSE,A1,123,B,Red
FALSE,B1,234,C,Red
TRUE,B1,234,A,Red
FALSE,B1,415,A,Red
I'd like to group by Scope, filter on TRUE and get the unique list of Items, then count these Items and subtract from a total unique count for the Color = Red
.
So, in the example above, I have 3 unique items for Color = Red
and I have 2 unique items with Scope = TRUE
, so the result should say 3 - 2 = 1
.
Because of the data structure, simple filtering won't help. I realize I need to use a complex LOD syntax, but after having tried them for a few hours, I find them rather confusing.
Does anyone have an idea how to write an LOD expression to give me the desired count? Thanks!