Hi,
I´m triying to define a calculated member that when a date measure is greater than current day, it shows the current day:
CASE WHEN DateCompare([Measures].[Issue Target end],Now())=-1
THEN
[Measures].[Issue Target end]
ELSE NOW()
END
But it gives me this error:
Formula is not valid:
No function matches signature 'CASE WHEN <Logical Expression> THEN <Expression> ... END'
How can i get this?
In my case (no pun intended) I was evaluating a set of calculated members that were booleans. My first attempt looked like this:
CASE
WHEN [Members].[Custom Boolean Field 1] THEN 'Case 1'
WHEN [Members].[Custom Boolean Field 2] THEN 'Case 2'
ELSE 'Other'
END
And I was getting the same formula error. I needed to adjust it to:
CASE
WHEN [Members].[Custom Boolean Field 1].Value THEN 'Case 1'
WHEN [Members].[Custom Boolean Field 2].Value THEN 'Case 2'
ELSE 'Other'
END
Hi,
You are on the righ track, however, the "Case when" structure is picky for formats.
Try using DateParse to force the right format for the Issue target end property.
CASE WHEN DateCompare([Measures].[Issue Target end],Now())=-1
THEN
DateParse([Measures].[Issue Target end])
ELSE NOW()
END
And don't forget to save your calculated measure in the right format (Month Day Year)
Martins / eazyBI support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.