Custom field previous status

I have below code

case when 
 ([Measures].[Issues history],
  [Time].[Day].DateMember('last Saturday')) > 0
THEN
Filter(
--set of project statuses within filtered statuses
 Descendants(
   [360L Quarterly Release].CurrentHierarchyMember, [360L Quarterly Release].[360L Quarterly Release],
--condition to find the status that was relevant
 ([Measures].[Issues history],
  [Time].[Day].DateMember('last Saturday'),
  [360L Quarterly Release].CurrentMember)>0).Item(0).Key
END

But I am getting below error.

Formula is not valid:
Syntax error at line 13, column 1, token ‘END’

The same code works well with another custom field. Can you please help

Nevermind got my mistake addressed. The Descendants was missing the bracket.

1 Like