hi
I am creating new data item and i am putting expression like this ,i m getting error
what is wrong with this code?
if ([M].[v].[Col] = 'Pass / Fail') then
if ([M].[v].[W] = 1 ) then replace([M].[v].[W],'1','P')
else (' F')
error : Parsing error near the position 73
You need parentheses around each portion of the "if", the "then" and the "else". You also might need an "else" to go with the outer if statement.
It looks to me like the replace function in this case isn't necessary. You also need to pay attention to data types....is [M].[v].[W] a number or a string? If it is a number you'd use the = 1 condition. If it is a string you might want to enclose the 1 in single quotes.
if ( [M].[v].[Col] = 'Pass / Fail' )
then ( if ( [M].[v].[W] = 1 )
then ( 'P' )
else ( 'F' )
else ( '' )