Need help with "CASE" and "for each?"

Hi,

I have this

Case
WHEN
[Sprint].CurrentMember = [Sprint].[Closed Sprints].CurrentMember
THEN 22
END

So I need to compare if the current sprint member is in the Closed Sprints aggregation

How can I achieve that?
Is there a function “in” or “for each”?

Thanks!

Hi @Vero,
You can use one of the set functions called Intersect(). It returns the intersection of two input sets, optionally retaining duplicates what means it is checking if the Current Spring member is also in the All closed sprints set. It is checked if the count of this value is bigger than 0 and if so - it will return 22.

CASE
WHEN
Count(Intersect(
  [Sprint].CurrentMember,
  ChildrenSet([Sprint].[All closed sprints])
)) > 0
THEN 22
END

best,
Gerda // support@eazybi.com