on 05-13-2014 9:10 AM
Hi Experts,
I have created a Formula variable in Bex with name "Exchange Rate" which is ready for input and its type is Number.
when i Created Webi report over this, I get the prompt with Exchange rate.
Now, My requirement is to show the Total value = Stock * unit cost * Exchange rate if user put some vaalue in Exchange rate prompt say 2.3.
If user doesn't put anything in Exchange rate Prompt(means left blank) then Total Value = Stock * unit Cost.
I used the userresponse function on the exchange rate but it wont work. I am getting #error in the column.
First i Create a variable with name Exchg Rate = userresponse("[Exchange rate]")
and then i created the variable Total value =If(IsNull([Exchg Rate])) Then Stock * unit Cost ELSE ( Stock * unit cost * Exchange rate).
But i am not getting the desired results.
Please advise/help on this.
Thanks,
Abhimanyu Sharma
Hi Abhimanyu,
What Mr.Loic said seems correct and try to convert the userresponse value to number using tonumber() function. I had same requirement to display the date so I converted userresponse value to date using todate() function then it worked correctly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhimanyu,
Did you take into account function UserResponse() will return a type String ?
This means you cannnot use this function as a numeric value to calculate your Total Value.
You need first to convert this String to a Number with function ToNumber() and then multiply its result by your other Measure values.
Regards,
Loic
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Always use a technical name of the Bex prompt in Userrepsonse().
Also try this:
@ vExchange Rate:
=if (Userresponse("Technameofprompt") ="") then 0
Else
Userresponse("Technameofprompt")
@ vTotal Value:
=Stock * unit cost * Exchange rate
Thanks,
Jothi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhimanyu
you should write =Userresponse("Exchange rate").
use this formula in blank cell to confirm it is pulling data.after this use the variable for calculation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
9 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.