Tuesday, 16 December 2014

OBIEE11g: "NULL" Value in Prompts (NULL is showing as a value in the Prompts) or Removing NULL value from Prompts

In OBIEE 11g when we create a prompt on a column we can see "NULL" value is in the prompt. As it is the unwanted value we have to suppress this value. We can achieve this by following the below steps...

Step 1 : NULL is getting displayed in the Prompt

Step2 : Edit the prompt and look for the column on which the prompt is created

Step3 : Open the RPD in Online or Offline mode. Go to the physical layer and select the table, expand the table and select the column


Step 4 : Edit the properties of the column by double clicking on it.


Step 5 : Unchecked the Check box which says "Nullable" as follows



Step 6 : Save the RPD and check the same on the dashboard. Now you can see the NULL value got disappeared.

NOTE : After saving the RPD changes it will take some time to reflect the result on the dashboard. Immediately you can not see the NULL value disappeared. It will take about an hour or so to reflect if you make the changes in Online Mode. If you restart the services then you can see the immediate expected result.
After making the changes in Online mode and saving it dont forget to clear the cache.

How to Unhide a Dashboard in OBIEE11g - QuontraSolutions

Follow the below steps...

Step 1: Go to the Dashboards from Catalog link as shown in the previous post. Extreme right side you can see one small check box which says "Show Hidden Items". Check that check box so that you can see all the Hidden objects (Dashboards) as shown in the below screenshot.



Step 2: Click on the "More" link of the Hidden dashboard. Click on "Properties". Now you can see Properties window Popping up. Under "Attributes" uncheck the check box which says "Hidden". Then click on "Ok". (Please follow the below screenshot)


Step 3 : Now you can see the dashboard is unhidden......

OBIEE11g: Replacing a "NUMBER" datatype with NULL ( ' ' ) in a case statement

We have a requirement where we need to replace a NUMBER data type with NULL value (blank value). We have IFNULL function to replace a NULL value. But in this scenario we have to replace a number data type value with a character ( Null value is considered as character in Obiee). To achieve this we have done a simple manipulation using a case statement.

The following example will illustrates the workaround....

Scenario : I have a number data type column Calendar Year . When the Year is greater than 2009 then it has to display the value eg : 2010 ,2011 etc.. otherwise it has to display null.

Step 1 : Add the column to the Criteria tab.


Step 2 : Click on the Results tab and see the results.

Step 3 : Now you can see its retuning data which is less than 2009 also. So i need to replace the values which are less than 2009 with a blank. Go back to the criteria tab and click on the column formula and write the formula as shown in the below screen shot.

Syntax : Case when "CONDITION" then "VALUE" end


Step 4 : Now go to the Results tab you can see the expected result.


Conclusion : Here we are just taking leverage on the case statement functionality. If we exclude the"Else"part in a case statement then it would consider null as (blank value) default value. It wont bother about the data type of the first argument.

How to Use Prompt as Report Selector or Using a Prompt as a Report Selector in OBIEE11g - QuontraSolutions

It is most common requirement in many of the project. This is a bit tricky in 10g version but in 11g this is a simple task. In 10g version we are using "Guided Navigation Link" to get this done. In 11g version we can do it very simply using the "Section --> Condition" option in the dashboard. In this post we will see how to do it....

Scenario: We have three reports, for example 1) Yearly Revenue Report 2) Quarterly Revenue Report 
3) Monthly Revenue Report

The reports should be displayed on the dashboard as per the user selection i.e there should be a prompt which displays the three reports names depending on the report name that the user selected in the prompt the respective has to display. If the user selects Year value in the prompt then only year report has to display, If the user selects Quarter then Quarter report has to display and so on...

Here the user can have two choices either he can able to see only one report at a time using Radio button prompt or he can able to see multiple reports at a time using choices list prompt. In this post we will see the second option (Selecting multiple reports or Single report at a time). This is easy in 11g because of the Presentation Variable property, like i discussed in my earlier post the Presentation variable in 11g can capture multiple values. Please follow the below steps to do get this requirement....

Step 1: Creating the Reports



I am going to create three reports now Yearly Sales, Quarterly Sales and Monthly Sales as follows









Step 2: Creating the Dashboard Prompt

Create a new dashboard prompt by clicking on 'New" and then by selecting "Dashboard Prompt" as shown in the below screenshot

Now select the Subject Area from which you want to create the prompt. In my case i have used "Sample Sales Lite"


Click on the Add (+) icon and select Column Prompt



Now select any column from any of the tables because we not going to use any column values here we will create one dummy column and Hard code the report names as values.



I have selected the Per Name Year column and renamed it to "Select the Report" as shown in the below screenshots. Select the User Input as "Choice List" (By default it would be Choice List only)



Click on the Edit formula icon of the prompt and in the column formula.


Just enter any string value in the single quotes and click on Ok. In my case it is 'Dummy'


Now expand the Options ans select the "Choices List Values" as Specific Column Values as shown in the below screenshot.



Now Click on Edit icon and enter your report names as values of the prompt as per the requirement.


In my case i have given the report names as Year, Quarter and Month in the prompt. Here the report names are nothing but values of a column.


After entering the values click on Ok


Depending on your requirements select the options "Enable user to select multiple values", "Enable user to type values" and "Require user input".

Here very important thing is defining a "Presentation Variable" . In Select a Variable section select "Presentation Variable" then give one name in the below box. In my case i have created a variable called "Select" . All the presentation variable names are case sensitive so we need to be careful while creating a filter with presentation variable. You can see i have used the same name of the variable everywhere (Select) with the same case how ever i created it.

Enable user to select multiple values : If you need to enable multi values select option for the user you must select this option. In my case i would like to give the option to the end user to select multiple values so i enabled it by clicking on the check box.

Enable user to type values: Some times the user would like to type in the values like a text box field so this check box enables that feature so that the user can directly type the values with out selecting it from the prompt drop down.

Require user input: If you would like to make this prompt as a mandatory selection the you can select this check box. This option will disable the "Apply" button if the user is not selecting any value from the prompt.


After selecting all the required options save the prompt by clicking on Save icon as shown in the below screenshot.



Step 3: Creating the dummy reports for section condition validation.

Now create 3 dummy reports one for Yearly report , one for quarterly report and one for monthly report as shown in the below screenshots.

We have pull any column from any table to the criteria tab and go to Edit Formula and just give the Report name what ever you have given in the Prompt. The Report name that we have given in the Prompt and the value we are giving in this dummy column should be the same.

Remove the existing name give the new name as per the prompt value


 In my case i have given "Year" as a value in the prompt and the same i have given in the edit formula in the single quote as it is a string.


Now click on the filter of the column properties.


Select the operator as "Is equal to / Is in" then click on "Add More Options" and select "Presentation Variable" 


Type the presentation variable name that we have created. In my case it is "Select" (Case sensitive) and click on Ok.


After doing this you can see the filter as follows. Then save the report. In my case i have saved this report as Year Dummy.



Repeat the same process for creating Quarter Dummy report and Month dummy report as shown in the following screenshots.



By the end of this step you will have three dummy reports created Year , Quarter and Moth.

Step 4: Creating a New Dashboard to Place these reports.



Click on the New icon and select the "Dashboard" option.


Give the dashboard name. Here i have given the dashboard name as Report Selector. You can see the same on the following screenshots


Now add the content to the dashboard as shown below


Add four sections one is for Prompt , one is for Year report, one is for quarter report and one is for month report.


Now drag and drop the prompt and reports in the respected sections. Better to follow the order either ascending or descending because if you dont follow the order then the reports will display in jumbling manner when the user is selecting all the values in the prompts. I followed the descending order here so if we select all the values in the prompt then first Year, next Quarter and last Month Report will come in the order.



Now click on the section properties of the Year report section and select "Condtion"



Now click on Filter icon.


select Analysis and  click on Browse


select the Year Dummy report that we created in the previous step and click on Ok.



Click on Ok

Click on Ok



Repeat the same process for Quarter report section and Month Report Section



After adding the section conditions to the three report sections save the dashboard by clicking on the Save Icon and click on Run.



Now on the dashboard we can see only the prompt with three report names as check boxes as follows.


Now select the Year option and click on Apply ......


You can see only Year report on the dashboard



Now select the Quarter option and click on Apply ......


You can see only Quarter report on the dashboard

Now select the Month option and click on Apply ......


You can see only Month report on the dashboard


Now select all the three options and click on Apply ......



You can see all the three reports now ..... Year report, Quarter Report and Month Report on the dashboard in the same order how we kept the sections in the dashboards.



This is the continuation of the above screenshot.....