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:
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:
No comments:
Post a Comment