on 03-03-2015 12:27 PM
Hi,
I have created a Universe based on BEx query in UDT.
We have a Fiscal Period object in query, which is giving period values in characters.
We want to convert those periods to Month names, I have used below syntax but giving me parsing error.
=if([0FISCPER3].[LEVEL01]=1;Jan;if([0FISCPER3].[LEVEL01]=2;Feb;if([0FISCPER3].[LEVEL01]=3;Mar;if([0FISCPER3].[LEVEL01]=4;Apr;if([0FISCPER3].[LEVEL01]=5;May;if([0FISCPER3].[LEVEL01]=6;June;if([0FISCPER3].[LEVEL01]=7;July;if([0FISCPER3].[LEVEL01]=8;Aug;if([0FISCPER3].[LEVEL01]=9;Sep;if([0FISCPER3].[LEVEL01]=10;Oct;if([0FISCPER3].[LEVEL01]=11;Nov;Dec)))))))))))
Please suggest me.
--Praveen G
Hi
You need to use CASE statement…below is the sample code
CASE WHEN
[0FISCPER3].[LEVEL01]= '1'
THEN ' Jan'
WHEN [0FISCPER3].[LEVEL01]= '1'
THEN 'Feb'
WHEN [0FISCPER3].[LEVEL01]= '1'
THEN 'March'
END
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Praveen,
You are correct. The above logic is in correct.. Use "case" .
CASE expression
WHEN value_1 THEN result_1
WHEN value_2 THEN result_2
...
WHEN value_n THEN result_n
ELSE result
END
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.