Calculating Day of the week - Cognos 10.2

Ganesh Vijaykumar
Ganesh Vijaykumar used Ask the Experts™
on
Hello Experts,

I am a newbie to Cognos. I am using Cognos version 10.2.

I have a column named "Transaction_Date" in my data, using this i am trying to calculate "Day of the week"( i.e 1 is the first day of the week as indicated by the second parameter (1 to 7, 1 being Monday and 7 being Sunday).

I used the below mentioned syntax to get the results:

_day_of_week ([Time Metrics].[Transaction Date]],1)

But I am getting an error message as mentioned below:

Parsing error before or near position: 52 of: "_day_of_week ([Time Metrics].[Transaction Date]],1)"

I am clueless how to proceed further, since the syntax seems okay...

It would of great help if any one can help me to get the results.

Looking forward for the positive response!

Thanks,
Ganesh
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016
Commented:
Hi,

you have 3 closing brackets and 2 opening brackets in

day_of_week ([Time Metrics].[Transaction Date]],

Regards

Author

Commented:
Oh yeah I didn't realize it... Its working fine now...

Thanks,
G

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial