Friday 14 November 2014

Current Year and Previous Year in Prompt

SELECT YEAR(CURRENT_DATE) FROM "Human Resources - Workforce Profile" 
UNION
SELECT YEAR(CURRENT_DATE)-1 FROM "Human Resources - Workforce Profile"























Thanks,

Display last year data while selecting year in dashboard Prompt

Requirement is to display Current Year and Last Year data when select year from dashboard Prompt..

Steps:
Create a dashboard Prompt and set a presentation variable
























Now create a Dashboard Report and call above presentation variable




































Create a dashboard with above report and prompt

Display Data of Last 4 Quarters

Requirement is to display data of last 4 Quarters,8 Quarters when user select Quarter from Dashboard Prompt,  Quarter format is 2014 Q 4 , 2013 Q 3 etc.

Steps:
First we will create a report(Control Report) which will give previous quarters data ,This Control report Columns will be called in Dashboard Report

Control Report:

















Column Formula of "Year Quarter"
User will select from Prompt

Column Formula of  "4 Quarter Ago" 
CASE WHEN SUBSTRING("Time"."Year Quarter",8,1 ) ='1' THEN CAST((CAST("Time"."Year" AS INTEGER)-1) AS VARCHAR(4))||' Q 1'  WHEN SUBSTRING("Time"."Year Quarter",8,1 ) ='2' THEN CAST((CAST("Time"."Year" AS INTEGER)-1) AS VARCHAR(4))||' Q 2' WHEN SUBSTRING("Time"."Year Quarter",8,1 ) ='3' THEN CAST((CAST("Time"."Year" AS INTEGER)-1) AS VARCHAR(4))||' Q 3'  ELSE CAST((CAST("Time"."Year" AS INTEGER)-1) AS VARCHAR(4))||' Q 4' END

Column formula of "8 Quarter Ago"
CASE WHEN SUBSTRING("Time"."Year Quarter",8,1 ) ='1' THEN CAST((CAST("Time"."Year" AS INTEGER)-2) AS VARCHAR(4))||' Q 1'  WHEN SUBSTRING("Time"."Year Quarter",8,1 ) ='2' THEN CAST((CAST("Time"."Year" AS INTEGER)-2) AS VARCHAR(4))||' Q 2' WHEN SUBSTRING("Time"."Year Quarter",8,1 ) ='3' THEN CAST((CAST("Time"."Year" AS INTEGER)-2) AS VARCHAR(4))||' Q 3'  ELSE CAST((CAST("Time"."Year" AS INTEGER)-2) AS VARCHAR(4))||' Q 4' END

We now will call this report(Control Report)  in our Dashboard Report:
Filter in the Dashboard report is based on Control Report:

Dashboard Report:

















Dashboard Prompt is below :

















Below is the Dashboard when report and Prompt are taken place:





A fatal error occurred while processing the request. The server responded with: FOProcessor cannot run without a valid TMP directory. Please check if TMP directory exist and write enabled.

When attempting to export a Dashboard to Excel the following error message in sawlog is found: A fatal error occurred while processi...