Do you need to put a currentMember comparison in the case?
I guess this would work ok?
case
when [measure].[frequency] >3 then 'red'
when [measure].[frequency] <3 then 'yellow'
when [measure].[frequency] =3 then 'Green'
else 'NA'
end
Although do you have to use 'NA'? Can you not use null
in this situation?
case
when [measure].[frequency] >3 then 'red'
when [measure].[frequency] <3 then 'yellow'
when [measure].[frequency] =3 then 'Green'
else NULL
end
The other section of you calc looks like it needs to compare [poa].[segment].&A
against something using the IS
operator like this:
([poa].CURRENTMEMBER IS [poa].[segment].&A)
So adding this into the case
statement:
CASE
WHEN [measure].[frequency] >3
AND ([poa].CURRENTMEMBER IS [poa].[segment].&A) THEN 'red'
WHEN [measure].[frequency] <3
AND ([poa].CURRENTMEMBER IS [poa].[segment].&A) THEN 'yellow'
WHEN [measure].[frequency] =3
AND ([poa].CURRENTMEMBER IS [poa].[segment].&A) THEN 'Green'
ELSE NULL
END