Friday, 4 December 2015

How to apply ranks on Dates

1) Drag the [Order Date] field onto work Area. --- Field 1 on work area
2) Right click on that date field, then click on "More". then click on "Custom" then select Date format "Month/Date/Year".
3) right click on [Order Date] on work area, then click on "Measure" option, then click on "Maximum".  --- Field 1 on work area
4) Repeat first 2 steps.  --- Field 2 on work area
5)  Right click - Field 1 on work area then click on "Edit in shelf".

6) Redefine the calculation as like below
rank(max([Ship Date]))

7) Now Report with Dates, Ranks based up on Dates.
8) Create a Parameter to control the data on the report.

Parameter Name: Less than Equal
Data Type: Integer
Option: All
9) Drag the Field 1 on work area into Measure & define the name of field as "Ranks of Dates".
10) Right click on "Ranks of Dates" then click on "Create calculated field then develop the query as like below.
Name: Upto Selected Ranks
Syntax: [Ranks of Dates]<=[Parameter 1]

11) Drag the above calculated field into filters shelf, then right click on "Parameter" then click on "Show Parameter Control".
12) Now you can select the Number of Max Dates.

No comments :

Post a Comment