Sunday, July 4, 2010

OBIEE dynamic columns in the by statement

Did this one on OTN http://forums.oracle.com/forums/thread.jspa?threadID=1090834&tstart=0
First get your column names into a prompt:
image
sql is bit like :
SELECT case when 1=0 then "D0 Time"."T02 Per Name Month" else  '"D2 Market"."M04  Region"' end FROM "Sample Sales" UNION ALL SELECT case when 1=0 then "D0 Time"."T02 Per Name Month" else  '"D0 Time"."T02 Per Name Month"' end FROM "Sample Sales"
Put the column name between single quotes!
(Yes I know a LOV is better but this is just for demo)
Create a report:
image
Edit the rank formula to:
Rank("F1 Revenue"."1-01  Revenue  (Sum All)" by @{pColumn}{"D0 Time"."T05 Per Name Year"})
Put it on a dashboard:
image
image
Till Next Time

No comments: