cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic input parameters

Former Member
0 Kudos

I have a calculation view that has two input parameters: from_date and to_date. These parameters are eventually mapped down to an attribute view.  Is there a way to dynamically change the value of the parameter?  For example, if the user enters 201510 in the to_date, I want HANA to subtract 100 from the value and use the value 201410 instead. 

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

I know I can apply a filter in the projection node but that means the projection node will bring back ALL the data then apply the filter.  What I would like is to use a calculated column in the attribute view that takes in the input parameter from the calculation view.  For example, the input parameter in the CV is ip_yyyymm_from.  CA_PRIOR_YR_IP uses an input parameter coming from the calculation view.  I can use the IP directly in a filter but I can't seem to use a calculated column.

lucas_oliveira
Advisor
Advisor
0 Kudos

Hello Shad,

Well you didn't mention you're doing that on top of calculated columns. That is not so good idea indeed and that will work for filter/where clauses/joins on calculated columns. So why would you want to apply that on a calculated column?

You can apply to your concrete columns or add a new column to your base tables containing the logic you need and then filter the new column.

BRs,

Lucas de Oliveira

former_member185165
Active Participant
0 Kudos

Hi Shadi,

You can do any kind of operation on the input parameter of date type.

Consider this as example, which would be of help to you.

Thanks & Regards,
Vijay

lucas_oliveira
Advisor
Advisor
0 Kudos

Hi,

Sure. You can do that on the Expression Editor on the Projection holding your Attribute View in the Calculation View. Expression would be something like: COLUMN = '$$TO_DATE$$'-100.

BRs,

Lucas de Oliveira