cancel
Showing results for 
Search instead for 
Did you mean: 

Expression not working for Default Values of Input Parameter in Calculation View

Ajinkya_Jadhav
Participant
0 Kudos
768

Hello Experts,

I have a input paramter FISCAL_YEAR, in which I want to give default value an expression which is YEAR(CURRENT_DATE). But it does not work.

Any suggessions?

Thank You,

Best Regards,

Ajinkya Jadhav

DotEiserman
Advisor
Advisor
0 Kudos

Hi Ajinkha,

Can you provide a screenshot of your parameter setup please, it should work in the SQL engine.

Thanks

Dot

Ajinkya_Jadhav
Participant
0 Kudos

Hi Dot,

Below are the screenshot.

While doing Data Preview, it comes like this, instead of value of expression.

Regards,

Ajinkya Jadhav

DotEiserman
Advisor
Advisor
0 Kudos

I somehow can't see your screenshot.

Accepted Solutions (1)

Accepted Solutions (1)

Abhishek_Hazra
Active Contributor

Hi Ajinkya,

Go to the inpur parameter & on the value segment of the expression, click on the 3 dots, representing value help as shown below.

On the next screen, select language as 'SQL' under the language option changing from Column Engine (refer to screenshot below) & write the same expression, validate syntax & hit OK.


Activate the calculation view & it should work with default value as current year. Most likely your language is set as 'Column Engine' instead of 'SQL'.

Best Regards,
Abh

Ajinkya_Jadhav
Participant
0 Kudos

Hi Abhishek,

I have tried that already but instead of giving the value of the expression, it displays the expression itself.

Regards,

Ajinkya Jadhav

Abhishek_Hazra
Active Contributor
0 Kudos

Hi ajinkyaj1904, Have you selected the type as 'Expression'? It shows the expression itself when you select the type as 'Constant' instead of 'Expression'.


Best Regards,
Abhi

Ajinkya_Jadhav
Participant
0 Kudos

Just to add here, if someone else comes looking. Use Parameter Type as "Direct" sometimes if you use "Column" the expression will not work.

Answers (0)