on 04-24-2006 10:59 PM - last edited on 02-04-2024 4:01 AM by postmig_api_4
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.