cancel
Showing results for 
Search instead for 
Did you mean: 

Requirement to populate a kyf on the fly

Former Member
0 Kudos

Hi Experts,

I have requirement where a key figure should be populated at runtime. My infocube has a customer as char and key figures january purchase, february balance, march purchase and so on. Now I need to create a variable entry for calmonth. If the user enters month as february (02) then the report should look like

Customer|| January|| February|| Total

001 ||100000 ||30000|| 130000

002 || 20000|| 15000|| 35000

and if the user selects month as March (03) then the report should look like

Customer|| January|| February|| March|| Total

001 || 100000|| 30000|| 20000|| 150000

002|| 20000|| 15000|| 15000|| 50000

The total key figure should populate depending on what month the user has selected but it should add the preceding columns.

So my question is how do I get it done? How can I get a kyf to calculate on the fly?? Please help.

Regards

Accepted Solutions (1)

Accepted Solutions (1)

former_member188325
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi Murali,

The variable works if you have only one keyfigure but I have keyfigures such as Jan, Feb etc and I need the total of all those.

Regards,

Ninad

Former Member
0 Kudos

Ninad,

try this. Lengthy process, but thats what I could think immediatly

In your query add all the keyfigures like this.

Customer||JanuaryVol|FebVol|MarchVol|AprilVol|...|DecemberVol.

Now you need to create a formula variable to capture the calmonth that user is entering. So, in the formula variable( lets say zmonth), using user exit get the value as number (value can be from 1 to 12).

Now, create 12 calculated KFs one for each month, like this

For January,

JanuaryVol * ('zmonth' >= 1)

For February,

FebVol * ('zmonth' >= 2) upto December.

So, if user enters month 5, then all the calculated KFs upto May will display the values. June to December will display zeros.

Now create another CKF Total as the sum of all calculated KFs.

And, apply this setting "Suppress Zeros". And hide your original KFs.

That should work

Good Luck

Gova

Former Member
0 Kudos

Hi Gova,

Thanks for the reply let me try it and get back at you.

Regards

Answers (0)