Using presentation variable from the first dashboard prompt as filter in the second dashboard prompt

There was a question on OTN forumhttp://forums.oracle.com/forums/thread.jspa?threadID=884660&tstart=0 on how to filter second dashboard prompt which use EVALUATE function with presentation variable which is populated from the first dashboard prompt.

Here is the solution with POWER function in EVALUATE.

First dashboard prompt:


Second dashboard prompt:


Edit column formula:

case when 1=2 then TIMES.CALENDAR_MONTH_ID
else
EVALUATE('POWER(%1, %2)',@{pv_test}{2},@{pv_test}{3})
end

If you write this instead of the code above:

case when 1=2 then TIMES.CALENDAR_MONTH_DESC
else
cast(EVALUATE('POWER(%1, %2)',@{pv_test}{2},@{pv_test}{3}) as char)
end

then you cannot use decimal numbers in edit-box of the first dashboard prompt to populate POWER function. So do not use cast as char for this solution, leave it in number format.

Test:


At initial start, the presentation variable pv_test is 0 and default values are used:

cast(EVALUATE('POWER(%1, %2)',@{pv_test}{2},@{pv_test}{3}) as char).


If we remove default values from code and leave just:

cast(EVALUATE('POWER(%1, %2)',@{pv_test},@{pv_test}) as char)

zero (0) is polulated from pv_test and the result of POWER(0, 0) is 1:


Decimal numbers test:
 

This works fine.