COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: sanchoniathon on 20 Aug 2014 02:43:43 PM

Title: Invite the user to enter a number
Post by: sanchoniathon on 20 Aug 2014 02:43:43 PM
Hi to all,

1- We have this Report Studio v10
2- We need to allow the user to enter a number (let's say 10) which will multiply ALL records of our list report by 10% for example.  I mean we have a query feeding our LIST object on which we want to MULTIPLY by 10% or 50% or 100% (which is actually the real normal data).

Is this possible and can someone please let me know the appropriate steps to do ?

Thanks for any valuable feed-back !
Title: Re: Invite the user to enter a number
Post by: cognostechie on 20 Aug 2014 06:03:28 PM
What exactly does this mean ?
Title: Re: Invite the user to enter a number
Post by: BigChris on 21 Aug 2014 01:56:07 AM
Surely you just need a text box prompt for the user to enter a number into - then you can us that in your report as needed
Title: Re: Invite the user to enter a number
Post by: sanchoniathon on 21 Aug 2014 06:43:01 AM
hi to all,

In deed I found this answer in another forum:

You will need to create a prompt for the user to enter their number such as ?EnterPercent? and then each field in the report will have to be written to multiply the data item times the prompt.

For example: if your current data item is [Unit Sales $] then create a new field called [Unit Sales Calc $$] and the formula for that field would need to read "[Unit Sales $] * ?EnterPercent?"



Thank you all and hope to chat again.
Title: Re: Invite the user to enter a number
Post by: Lynn on 21 Aug 2014 07:07:51 AM
Quote from: sanchoniathon on 21 Aug 2014 06:43:01 AM
hi to all,

In deed I found this answer in another forum:

You will need to create a prompt for the user to enter their number such as ?EnterPercent? and then each field in the report will have to be written to multiply the data item times the prompt.

For example: if your current data item is [Unit Sales $] then create a new field called [Unit Sales Calc $$] and the formula for that field would need to read "[Unit Sales $] * ?EnterPercent?"



Thank you all and hope to chat again.

Isn't that the same thing that BigChris suggested?

Be aware that the formula [Unit Sales $] * ?EnterPrecent? is not exactly correct based on your original post. If you want the user to enter 20 and then apply 20% to your metric then the formula would be [Unit Sales $] * ( ?EnterPrecent? / 100 )
Title: Re: Invite the user to enter a number
Post by: sanchoniathon on 21 Aug 2014 07:38:32 AM
Yes Lyn it was in a simpler way and that's why I started my reply like this:
"In deed ..."

:)

Thank you also for the REMINDER for the percentage.
Title: Re: Invite the user to enter a number
Post by: sanchoniathon on 22 Aug 2014 09:07:34 AM
Hello again ...

Question:

Let's say this is my current list object:
|Product# | ProductName  | Metric#1  | Metric#2 | Any other metrics ...
|100         | ProductThis    | 150.00     | 250.00    |     
|200         | ProductThat   | 125.00     | 115.00    |
|300         | ProductTWat  | 200.00     | 300.00    |
etc ...

What if we need to perform the same logic but this time by allowing the end-user to decide what Product# (a specific line on the report) the number he entered in the prompt will actually impact ?
Is this also possible ?

For example IF he wants to impact (multiply by 90%) all the metric values (Calculated Data items) for Product# 200 and also of Product# 300 only?

Thank you again for your time !
Title: Re: Invite the user to enter a number
Post by: MFGF on 22 Aug 2014 09:47:45 AM
Quote from: sanchoniathon on 22 Aug 2014 09:07:34 AM
Hello again ...

Question:

Let's say this is my current list object:
|Product# | ProductName  | Metric#1  | Metric#2 | Any other metrics ...
|100         | ProductThis    | 150.00     | 250.00    |     
|200         | ProductThat   | 125.00     | 115.00    |
|300         | ProductTWat  | 200.00     | 300.00    |
etc ...

What if we need to perform the same logic but this time by allowing the end-user to decide what Product# (a specific line on the report) the number he entered in the prompt will actually impact ?
Is this also possible ?

For example IF he wants to impact (multiply by 90%) all the metric values (Calculated Data items) for Product# 200 and also of Product# 300 only?

Thank you again for your time !

Hi,

I'm thinking you would have a second prompt for Product#. Your calculated values would then use the following approach:

if ([Product#] in (?YourProductParameter?)) then ([Unit Sales $] * ( ?EnterPrecent? / 100 )) else ([Unit Sales $])

Cheers!

MF.
Title: Re: Invite the user to enter a number
Post by: sanchoniathon on 23 Aug 2014 08:33:45 PM
Excellent MF,

Will surely try it but as for now I'm facing performance problems just by trying to apply the percent logic onto the entire list objects data items at same time and hit the infamous error message: 
"The request has exceeded the execution time limit. It will be cancelled"

So now that I know that what we wanted to do is in deed very possible I'm asking myself if it wouldn't be better to report against a "Multidimensional data model" instead of a "Relational data model".

Thanks again and might be back with other possible questions.
Title: Re: Invite the user to enter a number
Post by: bdbits on 25 Aug 2014 09:36:34 AM
It's entirely unreasonable to expect an answer to a question like that when we know NOTHING about your data structure, volume, database, servers, etc. or what Cognos components you have licensed and therefore available to you.

Also - and please no offense intended here - you seem to be very much a beginner. That is OK, we all start there. I suggest you at least browse through the Report Studio user guide which you can get to from Report Studio using menu item Help > Contents. If you think you will be using Cognos extensively in the future, you may want to invest in some training. I think you would have understood much better how to do the things you are asking about even if all you have to start with is the user guide.

Title: Re: Invite the user to enter a number
Post by: sanchoniathon on 08 Sep 2014 07:20:59 AM
bdbits,

1- Your'e right ... The fact is that I've stopped using Cognos for almost 3 years but started using it couple of months ago and some things don't remember or simply never used them. But I'm always wiling to take some additional training.

2- By the way I reviewd my report and for the moment everything works fine an less time to process. Yeaaaah    8)

3- I love this forum and hope to continue using it whenever possible so many thanks to all of you who gives advices as it is much appreciated for often only the documentation isn't enough.