[]
        
(Showing Draft Content)

Set Relative Date

You can set the relative date while filtering the data on the dashboard. Listed below are a few use cases for this.


Case 1: Set the Date Range slicer's default value to the current year.


Example: Suppose you want to create an Annual Dashboard adding a Date Range Slicer to analyze data by year. This slicer will work with Year mode and you can use the current year as the default value. If you view this dashboard during 2023 then it will use 2023 as the default value.

  1. Take a Pivot Table and bind it to the data.

  2. Take a Date Range Slicer and bind the Year field. On the Inspector tab, click the Default Value textbox.


    Click Default Value


    Set Default Value dialog box is displayed.

  3. Select the option Relative Date from the Value Type dropdown list. In the Default Value field, you can see the options for the Date Unit to select from the current Year, Quarter, Month, Week, and Day as shown below.


    Slicer Default Value


    In this case, we will select the date unit as Year from the dropdown list, and by default This Year option will be selected.

  4. Click OK and preview the dashboard. By default, the current year will be selected and the data will be displayed for the current year.


    Current Year Data

Case 2: Set the Date Range slicer's default value to the current year-month.


Example: Suppose you want to create an Annual Dashboard, by adding a Date Range Slicer to analyze data by year and month. This slicer will work with Year and Month mode and you can use the current year and month as the default value. If you view it on 2023/09/01--2023/09/31 then it will use 2023-09 as the default value.

  1. Take a Pivot Table and bind it to the data.

  2. Take a Date Range Slicer and bind the DateTime field. On the Inspector tab, click the Default Value textbox.


    Click Default Value


    Set Default Value dialog box is displayed.

  3. Select the option Relative Date from the Value Type dropdown list list. In the Default Value field, you can see the options for the Date Unit to select from the current Year, Quarter, Month, Week, and Day as shown below.


    Slicer Default Value


    In this case, we will select the date unit as Month from the dropdown list, and by default, the This Month option will be selected.

  4. Click OK and preview the dashboard. By default, the current month-year will be selected and the data will be displayed for the current year and month.


    Current Year Data

Case 3: Show the data for the current year of the month in the dashboard by default, without any slicer.


Example: Suppose you want to create a Monthly Dashboard to show the data of the current month of the year only, and there is no Slicer to change the month. When you view this dashboard during a certain month it will set this month as the default value.

  1. Take a Pivot Table and bind it to the data.

  2. Add a filter to the dashboard to show the data for the current month. Click the option Relative Date tab. From the Date Unit select from the Year, Quarter, Month, Week, Day, Hour, Minute, and Second.


    In this scenario, we have selected Year.


    Filter for Current Year


    Similarly, add a filter for Month.

    Filter for Current Month

  3. Preview the dashboard. By default, the current month-year will be selected and the data will be displayed for the current year and month.


    sumofvalue-currentyear-month

Case 4: Set the relative date for the Relative Date slicer.


Example: Suppose you want to create a dashboard, by adding a Relative Date Slicer to analyze last year's data.

  1. Take the Data Table and bind it to the data.

  2. Take a Relative Date Slicer and bind it to the data. The relative date component can only bind one date field, and the setting items related to adding relative dates will appear below after binding the field.

  3. To add a relative date option, click +Add Relative Date and select Previous Year from the list.


    Select Previous Year


    By default the option Previous Year will be selected in the setting area below.


    Select Previous Year


    Name: This is the name relative to the date. You can rename it, and click the blank space after renaming to preview the effect in the editing area.


    Date Unit: Select the appropriate date unit for the relative dates you added. When you select a different date unit, the options below will also change with it. If you select Year as an example, the following options are displayed: Previous Year, This Year, Next Year, Last n Years, Next Year, This year to date, Anchor relative to, and Add offset.


  4. Preview the dashboard. The dashboard will show the last year's data.

    Previous Year Data