Saturday, 12 August 2017

Dynamic Date Axis Display in Tableau

Design a dynamic Date Axis Display(On Superstore Data) if the user selects a date range that is larger than 365 days show a yearly Axis, if they select a date range larger than 30 days show a monthly Axis, otherwise show the view at a daily Axis Level.

Step1:-
Create  3 Calculated Fields Duration, “Date Granularity, and Date Axis  by below formulas.



Step 2:
Drag and drop Date Axis Cal. field into columns shelf, right click on Date Axis field and select Exact Date, Continuos. 

Step 3:
Drag and drop Date Cal.field into filter shelf and select Range of dates “click on next, click on apply, ok .

Step 4:
Right click on "Date" field in filter shelf and select add to context, Select Show filter.

Step 5:
Drag and drop "Sales" measure field into rows shelf and change aggregation as avg.

Step 6:
Perform any selection on Date Filter and check whether the
Date Axis is changing dynamically (or) not.

Thanks Gurus,
Prazval.ks

DAX Time Intelligence Functions

   Thanks Guru's, Prazval.Ks